You are here: RE: [PHP] select statement with variables ??? « PHP « IT news, forums, messages
RE: [PHP] select statement with variables ???

Posted by Jim Moseby on 12/21/05 15:11

>
> Can someone tell me why this select is wrong please---ive
> tried everything.
> the $cat is the tablename .
>
>
> $query=" SELECT title FROM $cat WHERE id='$id'";
>
>

Apparently, either $cat or $id is not the value you think it is. First, I
would try changing

$result=mysql_query($query);

to read:

$result=mysql_query($query) or die(mysql_error());

This will, no doubt, lend some insight into where your error is.

JM

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация