Php mysql - select?


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

Hi i have this code:
Code: $iteminfo = mysql_query("SELECT desc FROM wc_items WHERE itemid = '$_GET[id]'")
or die(mysql_error());
And it gives me
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 'desc FROM wc_items WHERE itemid = '103'' at line 1

What could be wrong?

No comments posted yet

Your Answer:

Login to answer
341 Like 48 Dislike
Previous forums Next forums
Other forums

private constructor
Hello,

Can we create a constructor as private? If yes, what is the use of it? If no, why can'

Unable to display contents in Second Drop Down Box
Hi All,

What I am trying to do is 2 dependent drop down boxes and when user selects su

Last Weeks sDate and eDate.
sDate - Start Date
eDate - End Date

I need to pull two dates for "Last Week" whi

Help with lottery style system?
I'm working on a currency system for forums and it is going to have a type of lottery system built i

Display a default image
I am trying to display generic image for items that don't have one, but I can't get it to display.

Insert Failing.
Hey,
I am making a Sign up page for a website, but the insert query into the Database does not se

need good snippet manager
Hi. as i am coding and learning more, it is becoming difficult to manage code snippets. how you mana

Display certain image depending on time of year
Hi, I am new to these forums and would really appreciate some advice on a piece of coding I have don

Find only certain URLs from page ... regex (semi-complete script)
Hi guys,

What I need to do is take a page & extract all the URLs from the page &a

PHP not creating file.
Its supposed to create a .ini file in the /scriptfiles/users/ with the name they entered into the fi

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