Jump to content

how to add in php?


codrgii

Recommended Posts

This is what im trying

 

$users= odbc_exec($con, "SELECT COUNT(*) FROM TABLE");
$total = odbc_result($users, 1);

$users4= odbc_exec($con, "SELECT COUNT(*) FROM TABLE4");
$total4 = odbc_result($users4, 1);

$users5 = "$total + $total4";
echo ""$users5"";

 

and it dosen't work,  it collects the data from 2 different tables, and i want to add them up into one final result, how would i manage to do this?

Link to comment
https://forums.phpfreaks.com/topic/165482-how-to-add-in-php/
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.