Re: [PHP] assign mysql query to a variable first or not

2004-04-07 Thread Red Wingate
One of the greatest benefits is the fact, that you can easily display your actual query without copying it, passing it to a variable and then display it's content: $result = mysql_query( ); would first become: $var = ; $result = mysql_query( ); echo $var ; now if the query fails,

Re: [PHP] assign mysql query to a variable first or not

2004-04-07 Thread Richard Davey
Hello Andy, Wednesday, April 7, 2004, 4:09:59 AM, you wrote: AB> is it better to give the mysql query string to a variable AB> instead of directly doing it with mysql_query? AB> i.e. AB> $query="select * from table";//is this a better way? AB> $query=mysql_query("select * from table");//or is th

[PHP] assign mysql query to a variable first or not

2004-04-06 Thread Andy B
hi... is it better to give the mysql query string to a variable instead of directly doing it with mysql_query? i.e. $query="select * from table";//is this a better way? $query=mysql_query("select * from table");//or is this way //better? mysql_query("select * from table");//not a good idea i do