From alex at alexfarran.com Thu Mar 31 14:05:38 2005 From: alex at alexfarran.com (Alex Farran) Date: 31 Mar 2005 21:05:38 +0100 Subject: [thelist] Re: SQL gurus In-Reply-To: References: Message-ID: Theodore Serbinski writes: > SELECT m1.date,m1.mileage,m1.notes,m2.date AS \'match\' FROM m m1 LEFT > JOIN m m2 ON (m1.date=m2.date AND m1.mileage=m2.mileage AND m2.notes > LIKE \'%'.$searchString.'%\')'; > Seems to work like a charm. Feel free to chime if you have any other > better solutions. Based on this the "match" field will have the date > value if a match is found... then in PHP I just test to see if this > field isn't null...works great! You can do it without the join like this: select date, mileage, notes, notes like '%whatever%' as match from m; Alex -- __o Alex Farran - Open source software specialist _`\<,_ PHP | MySQL | E-Commerce | Content Management (_)/ (_) site: www.alexfarran.com blog: alexfarran.blogspot.com phone:01273 474065 mobile:07790 389330 From boldfish at gmail.com Mon Mar 28 02:53:57 2005 From: boldfish at gmail.com (Tony Crockford) Date: Mon, 28 Mar 2005 09:53:57 +0100 Subject: [thelist] Javascript off CSS on hide elements in page Message-ID: Hi all, I have a site (sorry, protected by NDA ) that has some javascript submits and "jump" menus I want to provide functionality for users surfing with javascript off, and have provided