Front desk:
$con = mysql_connect (' localhost ', ' root ', '), if (! $con) {die (' Could not connect: '). Mysql_error ()); }mysql_select_db ("Test", $con); mysql_query ("Set names UTF8");//$sql = "SELECT * from Ecm_acategory"; $sql = "INSERT INTO Data (name) VALUES (' 999 '), echo $sql; $result = mysql_query ($sql); Mysql_close ($con);? >
Help, local testing without CI, so write no problem, add a CI, the path on the top of a few also do not work, do not know how to go. Thank you, first!
Reply to discussion (solution)
You
Xmlhttp.open ("GET", " project_c/add_zijiedian/" +str1+str,true);
Then look at the source code in the browser
The SQL statements are as follows
Insert budget Table $this->db->query ("Select @myLeft: =pleft from constrproj where constrprojname = ' $dangqiandianname '" ); $this->db->query ("UPDATE constrproj SET pright = pright + 2 WHERE pright > @myLeft"); $this->db->query ("U PDATE constrproj SET pleft = pleft + 2 WHERE pleft > @myLeft "); $query 3 = $this->db->query (" SELECT * from CONSTRPR OJ where constrprojid= (select min (Constrprojid) from Constrproj) "), $arr = $query 3->result_array (); $ParentID = $arr [0 [' Constrprojid '];//echo '; $this->db->query ("INSERT into Constrproj (Constrprojname,pleft,pright,parentid, KINDLVL) VALUES (' $zijiediandianname ', @myLeft + 1, @myLeft +2, ' $ParentID ', 1) '), $query 2 = $this->db->query (" SELECT * from Constrproj "); $result _count2 = count ($query 2->result ());
is the Pleft value not getting it?
Pleft cannot be empty
Your negative value to Pleft is @myLeft + 1
Obviously @myLeft is null value
Thank you, Seniors!
Ask a question, now plug is plugged in, but in the database Chaos (the page default encoding is UTF-8, database encoding is utf-8), this and get transfer parameters have a relationship? and using Ajax.
The first diagram is to assign values to the page, call the control layer, and the second graph is the control layer to get the value modulation model
Thank you.
That's not garbled, but URL encoding
Decode before storage (UrlDecode)
Younger generation, please advise. It seems wrong to write like this. The database is not plugged in.
Okay, thanks!