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
Did you know?Explore Trending and Topic pages for more stories like this.
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

what are '%S%', '%E%'
for example when i see Code: [Select]printf("Hello %srn", $name);
what does %s means

Select question
Hi,

First I would like to say that php is pretty new for me..
so please don't shoot me if

DELETE rows based on content
I have a link in my rows

$bit="http://bit.ly/abcd";
$query = mysql_query("D

Syntax error
hi im having a little trobble with this script
-------------------------------------------------

question about stripslashes and real_escape_string
im cleaning up an old app that I wrote fixing some of the vulernabilities from attacks.

I hav

urldecode question
How would I format this line of code properly?

<?php echo urldecode($_GET['Title']); ?

type check while uploading
Hi Everyone,

How can I check the exact type of a file while uploading on my site?

Here

first few characters only
hi, does anyone know how to use PHP to take the first few words of a text and limit them? i have see

Fatal error: Call to a member function fetchrow() on a non-object in C:xamppht
okay i have this query and everytime i add `item_id`=? to it... it gives me the error in the title..

Expandable Post Code
Hi,

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

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