
Untitled
By: a guest on
Apr 26th, 2012 | syntax:
None | size: 0.53 KB | hits: 17 | expires: Never
How do I multiple select in mysql using one query?
Select Id,Name From table where id = var
Select Id,Name From table where id = var
Select Id,Name From table where id = var
SELECT (
SELECT COUNT(*)
FROM user_table
) AS tot_user,
(
SELECT COUNT(*)
FROM cat_table
) AS tot_cat,
(
SELECT COUNT(*)
FROM course_table
) AS tot_course
SELECT user_table.name, user_table.email, cat_table.title
FROM user_table
FULL JOIN cat_table
ON user_table.cat_id=cat_table.id
ORDER BY user_table.id