Saturday, 15 January 2011

PHP: Output previous MySQL query -



PHP: Output previous MySQL query -

this question has reply here:

how show lastly queries executed on mysql? 10 answers

is there way see previous query entered in mysql server through php? not want results of query, want actual plaintext query entered.

no. default php disconnects , closes mysql connections when script ends, there nil left view when next connection comes in. , since have send query on each time anyways, definition should have query available already. if need query text kept, should set variable first

e.g. instead of

$result = mysql_query('select ...');

you should doing

$sql = 'select ...'; $result = mysql_query($sql);

php mysql sql

No comments:

Post a Comment