Microsoft
Software
Hardware
Network
Question : Mysql Query to select from two tables
Greetings,
1st Query
SELECT id_r,sum(duration) FROM `main`.`calls`
where call_start > '2010-06-20 00:00:00' and call_start < '2010-06-20 23:59:59'
group by id_r;
Now id_r will be displayed who has made calls on 20-6-2010
Now I need to get their names .The names are not there in calls table.
2nd table is called desc
select * from `main`.`desc`;
This will display 2 coullmns.Id and names.
Now i need the names in first query.I mean to say I dont want to use two queries.As i am using mysql query browser.Also If no id_r has made calls i need that record also be displayed with null value.
Please let me know.
regards,
Answer : Mysql Query to select from two tables
My friend figured out a solution. Attached is the modified code he used. Thanks for your comments
Random Solutions
JavaScript and Ajax won't save my data on IE7 but it works fine in IE8
Installing an SSL Certificate in Microsoft Exchange Server 2007
Few users are deleted from Active Directory but thay are still visible as my colleagues in my site
IIS WebDAV as an alternative to sharepoint and/or SMB over VPN
disk cleanup options
stepping trhough a web service
A new install of Windows 7 Ultimate network PCs See Me I do not see them File print sharing enabled and there are admins that match on every machine
try catch in sqlserver 2008
PHP/Mysql time
Dell PE2950 SMTD OS Install Hangs at Windows Setup