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

Changing files over
Just thought I'd start with the new forums looking really nice .

Ok basically I've made this

How to find OS bit version
How can I tell the person browsing my site is running 32, or 64 bit operating system?

Multiple websites question.
Hi, does php have any functionality that enables a programmer to extract information from a website

My query is being run with no results.
I have this.

Code: function DropUser($duser_id, $user_email, $user_username) {

upload image name with extension using php
hi frds..

<input id="file1" type="file" name="file[]" &a

Undefined offset
The following script checks to see if the user answer matches the correct answer.

Form Fiel

Need help with some php code :)
Hey! I'm quite new to this whole thing, so please don't fire me with shait on this one =D

I'm

php multiple action on submit
I have a form which says:

<form enctype='multipart/form-data' method='post' action='pr

How to use Ajax to verify data on a DB ?
Hello everyone, well i want to know how to check a value if it exists or not on a Data base and capt

mysql timestamp manipulation
How could I use a timestamp (e.g 2009-10-30 13:20:35 ), and with php find out if it is:

from

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