im new in php and sql im trying to select a username and count his total column name and display it. im kinda confuse how to do it. please help me out guys. thank you very much.
<?php
if( isset($_POST['query']) ){
$query = $_POST['query'];
$raw_results = mysql_query(
"SELECT *
FROM inventory
WHERE
(`serialproductkey` LIKE '%".$query."%') OR
(`employeename` LIKE '%".$query."%')"
) or die(mysql_error());
if( mysql_num_rows($raw_results) > 0 ){
// and this code that i need to combine with the search part
$tae = "SELECT SUM(total) AS TotalItemsOrdered FROM inventory";