Page is a not externally linkable
- Code, Content, and Presentation
-- PHP Server Side Scripting
---- Select where begins with a number


LinusIT - 7:59 pm on Oct 14, 2012 (gmt 0)


I'm still struggling with this but have had another idea, how about I select all the fields that begin with a number in one sql and then in another check to see if the reference I'm lookinf for exists.

First SQl:

$sql = "SELECT ref FROM log WHERE ref REGEXP '^[0-9]'";
$result = mysql_query($sql) or die(mysql_error());


I don't know how to write the second sql, it would be something like "SELECT * WHERE $ref IN $result" at a guess. Can anyone help with the second sql please?

Thanks


Thread source:: http://www.webmasterworld.com/php/4504777.htm
Brought to you by WebmasterWorld: http://www.webmasterworld.com