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.
Did you know?Explore Trending and Topic pages for more stories like this.

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

Form always sends to error page...
Hello,
Any help will be greatly appreciated. I am having trouble getting multiple fields to be re

use an array from 1 class in a second class
I have a class that adds data to an array

Then I have a second class and I need to check if t

rdns with php
I am trying to build a script that will show all of the different domains that are hosted on the sam

imap: how to save a copy of sent emails to sent elements
Hello my friends,

I am writing an online emailing application with inbox outbox/sent elements

how to validate date using javascript
I need to validate date in textbox using javascript..
The date is must be not greater than TODAY

Alternate messaging
I have 4 strings in MySQL db1

$string1 : Hello
$string2 : Hi
$string3 : Great
$strin

DirectoryIterator and Hacked Website
Hi Everyone.

My problem:
Some one has been sneaking in to my website hidden Iframes. I've

Different payment methods with different cross company requirements in F110
We are implementing SAP in a company in the shipping industry. They have the following requirement:<

php mysql query from input textbox
Hi,

I have a text box, in that i have given the mysql query. I can able to get the query in v

Check Digits and extracting digits
I think I can figure out the code for this but I am having a very hard time getting past the first s

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