Re:[wdvltalk] Joining tables... in MySQL

2007-04-04 Thread Tris
HERE's my SQL dump... CREATE TABLE `jobType` ( `id` int(12) NOT NULL auto_increment, `name` varchar(100) collate utf8_bin NOT NULL default '', `type` tinyint(10) NOT NULL default '0', KEY `id` (`id`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_bin AUTO_INCREMENT=7 ; -- -- Dumping data

Re: [wdvltalk] Joining tables... in MySQL

2007-04-04 Thread r937
I've googled OUTER joins, but Im getting errors...?? Hm funny, google never gave me any errors, and i've been using it since it came out what you want, young paduan, is a LEFT OUTER JOIN instead ;o) � The WDVL Discussion List from WDVL.COM � To Join wdvltalk, Send An Email

Re: [wdvltalk] Joining tables... in MySQL

2007-04-04 Thread Tris
Rudy, I knew you'd be there somewhere ;-p it's odd... I'd tried that, and just got one row of results. Still do... It's going through the jobs table and only returning jobTypes that have been flagged in jobs.. not ALL job types... any other ideas? On 04/04/07, r937 [EMAIL PROTECTED] wrote:

Re: [wdvltalk] Joining tables... in MySQL

2007-04-04 Thread r937
my bad, i meant padawan, not paduan see http://en.wikipedia.org/wiki/Padawan#Jedi_ranks ;o) � The WDVL Discussion List from WDVL.COM � To Join wdvltalk, Send An Email To: mailto:[EMAIL PROTECTED] or use the web interface http://e-newsletters.internet.com/discussionlists.html/

Re: [wdvltalk] Joining tables... in MySQL

2007-04-04 Thread r937
It's going through the jobs table and only returning jobTypes that have been flagged in jobs.. not ALL job types... i tested the LEFT OUTER JOIN on the data you supplied and it works ~fabulously~ maybe you have some other conditions that are clouding the issue � The WDVL Discussion

Re: [wdvltalk] Joining tables... in MySQL

2007-04-04 Thread Tris
Ah, i'm on 4.1.11 that make a difference? On 04/04/07, r937 [EMAIL PROTECTED] wrote: It's going through the jobs table and only returning jobTypes that have been flagged in jobs.. not ALL job types... i tested the LEFT OUTER JOIN on the data you supplied and it works ~fabulously~ maybe

Re: [wdvltalk] Joining tables... in MySQL

2007-04-04 Thread r937
Ah, i'm on 4.1.11 that make a difference? none whatsoever ;o) � The WDVL Discussion List from WDVL.COM � To Join wdvltalk, Send An Email To: mailto:[EMAIL PROTECTED] or use the web interface http://e-newsletters.internet.com/discussionlists.html/ Send Your Posts To:

Re: [wdvltalk] Joining tables... in MySQL

2007-04-04 Thread Tris
:-( Here I go again... it really doesn't work... ? :-( SELECT jobType.name, jobs.user, jobs.jobNo, jobs.jobType, jobs.hours, jobs.day FROM jobType LEFT OUTER JOIN jobs ON jobs.jobType = jobType.id WHERE jobs.id IS NULL OR ( jobs.user = '4' AND jobs.week = '2007-03-19' AND ( jobs.day = '3' OR

Re: [wdvltalk] Joining tables... in MySQL

2007-04-04 Thread r937
Here I go again... it really doesn't work... ? :-( yes it does, but you have to be really careful with WHERE conditions in outer joins SELECT jobType.name, jobs.user, jobs.jobNo, jobs.jobType, jobs.hours, jobs.day FROM jobType LEFT OUTER JOIN jobs ON jobs.jobType = jobType.id WHERE jobs.id

Re: [wdvltalk] Joining tables... in MySQL

2007-04-04 Thread Tris
OHHH!!! Makes sence... Cheers Rudy... as ALWAYS!!! (I'd kiss you, but that'd be a bit too fruity for my taste... not that there's anything wrong with that!) On 04/04/07, r937 [EMAIL PROTECTED] wrote: Here I go again... it really doesn't work... ? :-( yes it does, but you have to be really