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

breaking a text file into paragraphs based on strings
I have a text file of email addresses that is all squished together. It looks like this:

abc

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:<

i need help with php header and footer
I have designed a header and footer for my site and they seem to be ok when they are running individ

get the country of visitor and display content based on that
Hello all,

I have seen that Google analytics can tell you where a visitor is coming from and

ORA-01655: unable to extend cluster SYS.C_FILE#_BLOCK# by 128
Hi all,

Oracle 10g. Linux.

I'm facing the below error while trying to import a dumpfil

Expandable Post Code
Hi,

Hope you can help. Which currently I haven't upgraded to connect to a mysql server, so i

Ball movement
I want to move a ball from one point to another and it should hit a group of balls at the other end

change text color with a jQuery code
Hihow can I change the text in a asp:TextBox to a different color when I start typing using jQuery?I

BI in Upstream Production operations
Appreciate if you can assist in the following areas:
1) Examples of life before and after BI i

PO Release Strategy Issue
Hi Experts,

I am facing an issue related to PO release strategy. The details are-
<

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