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

Why does this file not return file names that start with numbers?
This file returns a list of filenames to help populate a drop down in my form. For some reason it ig

Advice on how to delete a mysql row using my form
Hi,

I am very new to php and am struggling to work out how to delete a portfolio item (a row

DBCA Templates
Hi all,

I'm working on creating a template for DBCA, but can't find any documentation on the

On page view, minus credit
Hello all, please, I need a little help with this script. I am charging one credit (credits can be p

Socket Server
In my following socket server, I am trying to listen to a connection through port 12345 in my web br

Sort a two dimensional array.
Hi. I've set up a two dimensional array that reads as follows:

Code: $modifiedData = array(

Include ("Absolute Path") of a file?
I'm not sure what I'm doing wrong. I am writing my php code in the same directory of the file that

Why doesn't this work? (SSH2)
This is my script:

Code: <?php
$connection = ssh2_connect('213.251.167.109', 22);

Is it a good practice to store user info. in sessions?
I am making a user class for my script which stores all the user information in sessions. It takes u

Downloading file (Headers)
I'm trying to make users download a file, but they must wait 60 seconds before it begins.

But

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