[PHP-DB] strange mysqli error

2006-08-22 Thread Richard K Miller
Good afternoon. I'm getting a weird mysqli error in my object destructor. Here's an example: query("SELECT 'test'"); print_r($db->error); } function __destruct() { global $db; $db->query("SELECT 'test'")

[PHP-DB] In_Array in Query

2006-08-22 Thread Kevin Murphy
I'm wondering if something like this is possible, where $array is an array. $query = "select id from table where in_array(row,'$user_area')"; Is it possible to see if the value of a particular row is in an array? I know I could create a loop where it would go through each one, but I was ho

Re: [PHP-DB] In_Array in Query

2006-08-22 Thread Chris
Kevin Murphy wrote: I'm wondering if something like this is possible, where $array is an array. $query = "select id from table where in_array(row,'$user_area')"; Is it possible to see if the value of a particular row is in an array? I know I could create a loop where it would go through each o

RE: [PHP-DB] In_Array in Query

2006-08-22 Thread Bastien Koert
not as sucj, but you could consider a sub-select (providiing your version of mysql supports it) something like this might also work $query = "select id from table where somefield [in|=|like] (". in_array(row,'$user_area').")"; Bastien From: Kevin Murphy <[EMAIL PROTECTED]> To: php-db@lis