• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
DB doesn't have num_rows/numRows ??

#1
In CodeIgniter 3 we could run a query then find if there were rows returned:

PHP Code:
$q $this->db->query('SELECT * FROM foo LIMIT 1');

if( 
$q->num_rows() == )

 
   $row $q->row(); 



In CI4 I don't see a way to check the number of rows, or if there was a row at all. How are you handling this? Can we get a numRows() please?
Reply


Messages In This Thread
DB doesn't have num_rows/numRows ?? - by skunkbad - 09-15-2018, 10:51 AM

Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2020 MyBB Group.