This is a discussion on ESTRAZIONE IMMAGINI within the MySQL Database forums, part of the Database Forums category; Hi everyone!I havo to extract the images from a table in mysql.. I'm using the query SELECT * FROM ...
|
|||||||
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
|
|||
|
On 24 Jul, 15:17, sonia.cotro...@gmail.com wrote:
> Hi everyone!I havo to extract the images from a table in mysql.. I'm > using the query > > SELECT * FROM img WHERE id = '.$_GET['id']; > > but it doesn't work..what's wrong? > Thank you! For future reference, the statement "it doesn't work" is about as useful as a chocolate teapot! Next time include details of the error that you are getting. |
|
|||
|
On Tue, 24 Jul 2007 16:56:36 +0200, aaooo54 <roobik@poczta.onet.pl> wrote:
>> SELECT * FROM img WHERE id = '.$_GET['id']; > the query is invalid: > $query="SELECT * FROM img WHERE id = '".$_GET['id']."'"; Unless it's an integer... > and you should not use $_GET['id'] without any validation for security > reason. Very true. @OP: impossible to say, echo mysql_error() to see what's wrong. -- Rik Wasmus |