Project Beehive ForumNull values from query functions.


Press Ctrl+Enter to quickly submit your post
Quick Reply  
 From:  Matt  
 To:  Peter (BOUGHTONP)      
42762.8 In reply to 42762.2 
$db->query (which is a wrapper around mysqli::query) can return false, so adding a call to ->num_rows to it won't always work (as you now already know), but you could check for $result->num_rows afterwards, e.g.:
if (!($result = $db->query($sql))) return false;

if ($result->num_rows === 0) return false;
 Reply   Quote More 

Reply to All    


Rate my interest:

Adjust text size : Smaller 10 Larger

Beehive Forum 1.5.2 |  FAQ |  Docs |  Support |  Donate! ©2002 - 2021 Project Beehive Forum

Forum Stats