sql error


Posted on 16th Feb 2014 07:03 pm by admin

I have been looking at this code for 20mins and can't work out what I am doing wrong. There is something wrong with my sql statement below is the error and the code. what I am trying to do is to
edit some information that is already in the database

Any help would be great.

Code: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'active=1 content='dafasdsdfasgbvfgf gasd' at line 3

Code: private function insertq() {

if ( !empty($this->pageName) && !empty($this->position) && !empty($this->content) ) {
echo $this->pageName ." pn
";
echo $this->position ." pos
";
echo $this->content." con
";
echo $this->active." act
";

$query = "UPDATE webContent SET
myOrder =$this->position
active=$this->active
content='$this->content'
WHERE pageName = '$this->pageName'";

if (mysql_query($query)) {
echo("<P>Your update has been added.</P>");
} else {
echo("<P>Error adding submitted update: " .
mysql_error() . "</P>");
}


}

return $returnValue;

}

No comments posted yet

Your Answer:

Login to answer
109 Like 15 Dislike
Previous forums Next forums
Other forums

Navigation include for all site directories
Hi,

I need a navigation include that can deal with directories at different levels on a site.

Dynamically allocating the number of rows in a table based on a variable value
Hi,
I have situation here which i cannot resolve, I have a variable temp which stores the num

PHP Upload issue
Hi guys,

I have stumble across an interesting issue with my script and is doing my head in.

unexpected T_STRING
error log "[Sat Jan 09 18:27:58 2010] [error] [client 127.0.0.1] PHP Parse error: syntax error

Code clarification
Hi

In the following code what could be the "search_print()" and where it could be

SAP Business Suite
Hi all:

Within the SAP Business Suite solution I would like to ask you the main differenc

add to sql result
ok see rite now my sites hit counter is counted from the mysql visitor log i need to clear it aft

Logic question
im wondering what's the best method to do the above list:

it is for alliance @ MMORPG game

parameter passing issue on function
Well I thought I had created a pretty slick web page, using ?page and $_GET to load pages which wher

Not Loading Function Into Div
I'm not sure whether to put this under the php forum or ajax forum but because I tink it's more of a

Sign up to write
Sign up now if you have flare of writing..
Login   |   Register
Follow Us
Indyaspeak @ Facebook Indyaspeak @ Twitter Indyaspeak @ Pinterest RSS



Play Free Quiz and Win Cash