fluidsharp Posted May 27, 2010 Share Posted May 27, 2010 Hello. After "SELECT" my $var is equal object(mysqli_result)#2 (0) { } and I done next: if (empty($var)) { I''ll fetch rows } else echo "Selected 0 rows"; It work but I want to know is this condition correct? Because I don't know exactly what does object(mysqli_result)#2 (0) { } it means. And how to watch what this object contain. Could you help? Thanks Quote Link to comment https://forums.phpfreaks.com/topic/203049-condition-for-returned-value-after-select-query-using-mysqli/ Share on other sites More sharing options...
Alex Posted May 27, 2010 Share Posted May 27, 2010 if(!$var->num_rows) { // .. } Quote Link to comment https://forums.phpfreaks.com/topic/203049-condition-for-returned-value-after-select-query-using-mysqli/#findComment-1063960 Share on other sites More sharing options...
fluidsharp Posted May 27, 2010 Author Share Posted May 27, 2010 Thank you! Quote Link to comment https://forums.phpfreaks.com/topic/203049-condition-for-returned-value-after-select-query-using-mysqli/#findComment-1063968 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.