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

Is there a more efficient way to code this than what I have?
I have three associative arrays.

$combinedSettings
$userSettings
$defaultSettings

How to read CSS message data
Hi,
I have a requirement here. When working as a Dev angel for multiple customers its really di

how to hide input fields on selection screen using variant attribute
Hello all,

I want to know how to hide input fields on selection screen using variant attr

Problem with HTTP Caching...?
Hi there, im trying to implement caching. But it doesn't always work.
I post it here because ther

Is there something wrong?
Hi all,

Just a quick question... can someone look at this code and see if something is wrong?

Problems with strings containing
Hey all,

I have encountered something strange in a script. I am trying to write an XML heade

Share admin accross websites
I'm using .net memberships and roles in one of my sites, but I need to be able to share logins and p

Extra fields in main body and php required.
I'm new to PHP so please be gentle. I have a little php script below that works well.
The &quo

Image resize
Hi again fellers

I managed to sort out the issues with the folder,

Final hurdle is th

preg_match logical error
Code: <?php
$s = file_get_contents("page.html");
preg_match('/<div cla

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