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

split string
Hi all

i have some names (imploded by comma):
Code: toronto,paris,madrid
Now, i would

Sharing PHP Sessions Across Domains
I am in the process of writing a script to share a php session across various domains I have.
The

Not showing whole name with mail () script
I sent up a simple mail form with the PHP mail() script. One problem is when it sends an email with

Read from forum
Haven't written anything forever and I would like to get back.
What I'm trying to do is getting t

Header redirect
Hello ive got a problem ive got form with its action set to itself.
Code: <form id="f

how to insert value
I am having file bookissueadd.php..... in which i am having tag

<td height="21&q

Problem in String replace program's output
Hi all,
I was trying to make a program which accepts a string and replaces it with another stri

distinct rows
Hi
version 10.2.0.3

I have a query output something like the following

ID

PHP FTP Can't upload Big FIles
Anyone had any success using FTP to upload a file say 90m?

im using ftp_put and it returns fa

How to Detect it is public_html or httpdocs?
How to check whether it is cPanel or Plesk?

If it found public_html perform <?php incl

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