i try the above to check if there are any records returned but it fails. any idea why?$st = $db->prepare( "SELECT count(*) FROM members WHERE user=?" ); $st->execute($user); $rows = $st->fetchrow_array(); if ($rows) { print font( {-size=>5, -color=>'Lime'}, "Το όνομα Χρήστη είναι π +ιασμένο! Παρακαλώ διάλεξε ένα άλλο!" ); exit 0; }
i am trying the above to get the total number of rows returned from the sql statement but it aint working why?$st = $db->prepare( "SELECT count(*) FROM members" ); $st->execute(); $row = $st->fetchrow_hashref; print $row->{'count(*)}
In reply to fetching rows problem by Nik
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |