I have this query which results in an array.
How do I count the values in it?
Because there numbers, array_count_values() doesnt work
I have this query which results in an array.
What are you actually hoping to get? The sum of the two numbers, or something else?
yes, can I get the sum of the 2 numbers in the array? (884+453)1337
Here you go.
SELECT
sum( EachTableCount ) sum
FROM
( SELECT count(*) AS EachTableCount
FROM chassis_types
UNION ALL
SELECT count(*) AS EachTableCount FROM blade_server_types
) tbl;
This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.