If you have a SQL error on your computer, we hope this user guide will help you solve it.
PC running slow?
I’m trying to count the number of uses of the “Sales” heading
if(!$connect)die("ERROR: unable to connect to database $db on forum $serverwith username $user(".mysqli_connect_errno().", ".mysqli_connect_error().")");different$userQuery: "COUNT(empID) equals FROM WHERE personal jobTitle='Sales'";$result = mysqli_query($connect, $userQuery);if (!$result) die("Failed to execute query from ($userquery) $db: " . .mysqli_error($connect));if (mysqli_num_rows($result) == 0) print("No entries found with thoughts $userQuery");different print("
SALES REPORT"); Related = ($row mysqli_fetch_assoc($result)) print("
Looks like this ".$row['COUNT(empID)'].""); mysqli_close($connection); // how to close the connection?>
Your SQL syntax has the most serious error; Refer to the specific manual that matches your MariaDB server version for the correct format to use next to “COUNT(empID) FROM staff WHERE jobTitle=’Sales” on line 1
$userQuery is equal to "COUNT(empID) FROM personal WHERE jobTitle='Sales'";
I’m not sure what I’m doing wrong, but I would appreciate any help. Turn on the teacher
I have this in my assignment, I’m not sure at home that will help.
"You can use two different functions in mysql: you canModify the SELECT statement to use a MySQL scoped function.or you can use MySQL functions that return the number of details inresult set. "
Sergey – Gigoyan is a database specialist with over 10 years of experience, specializing in database form, optimization, development, performance tuning, high provisioning, business intelligence and design.