Date: 07/31/02
- Next message: Adam Royle: "[PHP-DB] Benefits of assigning query to variable"
- Previous message: Dan Koken: "[PHP-DB] Re: adding a space in mysql"
- In reply to: Brian Graham: "[PHP-DB] Benefits of assigning query to variable"
- Next in thread: Adam Royle: "[PHP-DB] Benefits of assigning query to variable"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
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" <croakingfrog <email protected>> wrote in message
news:20020731185942.78748.qmail <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
- Next message: Adam Royle: "[PHP-DB] Benefits of assigning query to variable"
- Previous message: Dan Koken: "[PHP-DB] Re: adding a space in mysql"
- In reply to: Brian Graham: "[PHP-DB] Benefits of assigning query to variable"
- Next in thread: Adam Royle: "[PHP-DB] Benefits of assigning query to variable"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]

