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

Beginner PHP code help
Hi I'm new to php but if someone could please read the question below and help it would be great.

Writing to the middle of a file
Hi I have a bit of a problem. Is there any way i can write some text to a middle of a text file. For

Security Exception on pages using AJAX
I am getting the exception: attempted to perform an operation not allowed by the security policy on

PHP Upload issue
Hi guys,

I have stumble across an interesting issue with my script and is doing my head in.

Shuffle Array
Hi,

I am writing a script for a game that needs players to randomly be assigned a target (ano

Get to know your fellow coder
I think it's time we got personal around here. There's a lot of code swapping and a few members kno

Handling text changed in text box control using Ajax
I need to create a web form with a text box control. When someone types text into the textbox I nee

Agency Business Process
Hi,

I don’t understand the process of the agency business in SAP.

In my

Print out contents of to Excel
I have got this script that gathers all the data that I need but I need it to send it to excel inste

Open/Close Links in Php
Hello, Hoping someone can inform me how I can get PHP to automatically open a set of links in a new

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