hi john, maybe this is the right way $where="id like ".$id; $query="select * from ccl where '".$where."' order by AU desc"; $result=mysql_query($query);
regards martin > -----Ursprüngliche Nachricht----- > Von: jtjohnston [mailto:[EMAIL PROTECTED]] > Gesendet: Montag, 18. Februar 2002 08:00 > An: [EMAIL PROTECTED] > Betreff: [PHP] More: Frustrating ? > > > > > while ($mydata = mysql_fetch_object($news)) > > > So what am I doing wrong here: > > > $where = "id like $id"; > > > $news = mysql_query('select * from ccl where '.$where.' > order by AU desc'); > > //desc => z-a > > > A) Have you already confirmed that a valid database > connection was made? > > Yes. A copy and paste of working code: > $news = mysql_query("select * from ccl ORDER by AU asc"); > Connection was made. > > So I do? > > $news = mysql_query("select * from ccl where '.$where.' order > by AU desc"); > > or ? > > $news = mysql_query("select * from ccl where '.%$where%.' > order by AU desc"); > > The % are not necessary? because id is an auto_increment > number from 0 to > 1,000+. > > Why the ' inside " ? > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php