mysql Query executed ?
-
How can i know if a query was executed correctly …
i did this :
$sql = ” the sql query ” ;
$sql_query = $wpdb->query($sql);
then tested both :
if (! $sql_query) { the query dident work } else …
and
if ($sql_query != 1) { the query dident work }else …
but both dident work in term of showing that the query were executed (i know it did because i can see some results in my phpMyAdmin)
also another weird thing is that i use the same command
” if ($sql_query != 1) ” in another php file and it work !
any idea ?
also the $sql_query return 0 if it was executed and nothing if it dident (weird ? )
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
The topic ‘mysql Query executed ?’ is closed to new replies.