Jump to content

Using Count Function


Xtremer360

Recommended Posts

I have no idea why but no matter what the eventid is, the label always returns 20 and I"m not sure why. Is my synatx wrong?

 

$eventid = (int)$_GET['eventid'];
$result = mysqli_query($dbc, "SELECT count(label) FROM `events` WHERE `event_id` = '$eventid'");
$label = $result + 1;
echo $label;

Link to comment
https://forums.phpfreaks.com/topic/222030-using-count-function/
Share on other sites

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.