The query where $my_values is populated and the call to the function is located in the chunk of code below the function. Prior to that point, $my_values does not exist.
Quote:
PHP Code:
$my_values=$db->query("SELECT 'field1','field2','field3','field4' FROM " . TABLE_PREFIX . "demo_table WHERE field5=".$some_var); // $my_values is now an array that is 4 fields wide and has as many rows as the number of occurances of field5 = $some_var
if (check_fields($my_values))
// This sends the $my_values array to a custom function and expects a true or false as a return value
{
//Do something
}
|
I'm positive that I've included all of the code to figure out if what I'm trying is possible or not, anything else would just be noise. If "valid MySQL resource" means something other than this piece of code, then I'm afraid you've lost me.
Sorry I missed the php tags in the original post and grabbed the code ones instead.
Thanks again for your help and patience!