List:General Discussion« Previous MessageNext Message »
From:Paul DuBois Date:October 26 2000 4:28am
Subject:Re: MySQL/PHP Help!
View as plain text  
At 4:15 PM -0700 10-25-2000, Jim Rota wrote:
>Why doesn't this work?
>- after opening up a connection...
>$sql = "SELECT rank FROM banners ORDER BY rank DESC LIMIT 1";
>    $result = mysql(mydb,$sql);
>  $sql = "delete from banners where rank='$result'";
>    $res = mysql(mydb,$sql);

Because you're making the same mistake you made when you asked a
similar question yesterday.  $result does *not* contain the values
in your result set.

I suggest you take a hard look at the discussion of the mysql_query()
function in the PHP manual.


Paul DuBois, paul@stripped
MySQL/PHP Help!Jim Rota24 Oct
  • Re: MySQL/PHP Help!Jason Terry24 Oct
  • Re: MySQL/PHP Help!Jim Rota26 Oct
    • Re: MySQL/PHP Help!Paul DuBois26 Oct
  • Re: MySQL/PHP Help!Rolf Hopkins26 Oct
  • Re: MySQL/PHP Help!Jim Rota26 Oct