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

Matchcode in ALV change header column
Hello everyone,

I am working in an SAP system that is currently in upgrade and conversion

Using cURL to PUT
Can somebody help with the correct php code to make a cURL PUT request. Here is a sample of code bel

Splitting Attributes
SQL> SELECT I_NAME, substr(I_NAME,1,instr(I_NAME,'O')) "First part",

substr(I_NAME, IN

Preg_match question
I want to use preg_match to make sure a string is always 6 characters long and only contains 0-9 and

confused between ' ' and " "
there is a php i set:
$begin_date_query = mysql_query( "SELECT SUBDATE(due_date, INTERVAL $d

Opening Multiple Files/Links in Order.
I want to open links in order/one-by-one and check each for a specific string.

Example:
I

Script not running properly
Hello Everyone
This is a basic script for posting to a database. I'm not sure why it doesn't work

explode() function problem maybe
Hi I'm having trouble searching my database. When I type two words in the search field it only searc

Navigation include for all site directories
Hi,

I need a navigation include that can deal with directories at different levels on a site.

Undefined variable when using $_SERVER['PHP_SELF']
Hi guyz, please suggest me something...
On first.php I have one input field NAME, and on posting

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