Jump to content

COUNT ROWS ?? IN A DATABASE PROBLEM ??


jigsawsoul

Recommended Posts

You are using a built in constant with the wrong function.

 

 

Change

mysql_fetch_assoc($result4, MYSQL_NUM);

to

mysql_fetch_array($result4, MYSQL_NUM);
//or
mysql_fetch_row($result4);

 

also, you need to run mysql_query on $result4...

 

i.e

 

$query4 = "SELECT COUNT(*) FROM web_attendance WHERE occurence_id = " . $occurenceid;
$result4 = mysql_query($query4)or trigger_error(mysql_error(), E_USER_ERROR);
$row4 = mysql_fetch_row($result4);

echo $row4[0];

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.