Can a range be passed to a query?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



I'm still struggling with using ranges... Can they be passed to a query
somehow...

I have this so far but it pulls nothing:

     //Show all  with $letter  not between "A" and "Z"

if ($selectedLetter = "#") {

                               $other = range('0','9');

$sql = "SELECT DISTINCT ID, name, address FROM restaurants WHERE name LIKE
'$other'";
        
 $result = mysql_query($sql) or die(mysql_error());

}
                 
while($row = mysql_fetch_assoc($result)){

                                                            

$name = $row['name'];

printf(
           
'<a href="view.php?ID=%s"><b>%s</b><br />%s<br /><br /></a>',

$row['ID'],  
     
$row['name'],
     
$row['address']
   
);
                                                            

}


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux