[PHP-DB] Job interview test - I give up...

2004-12-01 Thread Tristan . Pretty
I recently saw a job that I thought I'd be good for, so they sent me a test... All good.. but I realised that I couldn't do it.. I got sooo damned close, but could not finish... :-( Anyhoo, here's the test: http://www.beertastic.co.uk/test_problem.zip And the test parameters are below If anyone

Re: [PHP-DB] Job interview test - I give up...

2004-12-01 Thread Brent Baisley
OK. No offense, but that seems fairly easy. Here's one possible answer: select categories.*,count(dv_id) from categories left join dvds on dv_caid=ca_id group by ca_name having ca_name not like 'T%'; On Dec 1, 2004, at 8:13 AM, [EMAIL PROTECTED] wrote: I recently saw a job that I thought I'd be

Re: [PHP-DB] Job interview test - I give up...

2004-12-01 Thread Tristan . Pretty
, we learn... Brent Baisley [EMAIL PROTECTED] 01/12/2004 13:44 To [EMAIL PROTECTED] cc [EMAIL PROTECTED] Subject Re: [PHP-DB] Job interview test - I give up... OK. No offense, but that seems fairly easy. Here's one possible answer: select categories.*,count(dv_id) from categories left

Re: [PHP-DB] Job interview test - I give up...

2004-12-01 Thread Raymond Chua Sing
/* NOTE: this is what I came up with though I don't have the time to test it. I think theres another way to solve this just by using a different sql statement. */ function getNumDvdsInCategories() { $query = SELECT ca_id , ca_name FROM categories, dvds WHERE

Re: [PHP-DB] Job interview test - I give up...

2004-12-01 Thread Brent Baisley
, I'll try what you've suggested... Cheers.. we live, we learn... Brent Baisley [EMAIL PROTECTED] 01/12/2004 13:44 To [EMAIL PROTECTED] cc [EMAIL PROTECTED] Subject Re: [PHP-DB] Job interview test - I give up... OK. No offense, but that seems fairly easy. Here's one possible answer: select

Re: [PHP-DB] Job interview test - I give up...

2004-12-01 Thread Tristan . Pretty
PROTECTED] Subject Re: [PHP-DB] Job interview test - I give up... I code much better with drink than after drink. You never had to use JOIN before? Obviously you are not married. Although marriage tends to be a left join or right join as opposed to a straight join, which allows you to force

[PHP-DB] Basic JOIN tutorial - RE: [PHP-DB] Job interview test - I give up...

2004-12-01 Thread Gryffyn, Trevor
-Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: Wednesday, December 01, 2004 8:14 AM To: [EMAIL PROTECTED] Subject: [PHP-DB] Job interview test - I give up... I recently saw a job that I thought I'd be good for, so they sent me a test... All good

Re: [PHP-DB] Basic JOIN tutorial - RE: [PHP-DB] Job interview test - I give up...

2004-12-01 Thread Stuart Felenstein
--- Gryffyn, Trevor [EMAIL PROTECTED] wrote: If you have Microsoft Access or something else that graphically lets you create queries, you might try building a query that you know works and returns what you need, then looking at the SQL VIEW to see how the syntax goes. It can help you

Re: [PHP-DB] Basic JOIN tutorial - RE: [PHP-DB] Job interview test - I give up...

2004-12-01 Thread Tristan . Pretty
Bloody marvelous...!!! Many thanks.. I'll set myself a few challenges, and see what happens...! Cheers, Tris... Gryffyn, Trevor [EMAIL PROTECTED] 01/12/2004 15:47 To [EMAIL PROTECTED] cc [EMAIL PROTECTED] Subject [PHP-DB] Basic JOIN tutorial - RE: [PHP-DB] Job interview test - I give up