sure there are, you can call the query in multiple places, for example:

$sql = mysql_query("INSERT INTO $table_name WHERE db_field =
$search_string");

Then say you have a routine to check for missing for elements and you would
like to log failed vs. successfull attempts your code flow would be
something like:

if (!$search_string && !$var02) {
    $sql;
} else {
    $sql; }
HTH
Jas

"Brian Graham" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> Are there any benefits to assigning a query to a variable?
>
>



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

Reply via email to