Awesome thanks piti. That works like a charm. I was under the false impression that my mySQL version didn't support joins - I couldn't have been more wrong! Because I didn't think I supported them, i've never taken the time to learn about them before. That'll change now!
Many thanks,
James
Hello, below is my rather complecated sql query. It does two things:
a) Gets all the articles in catagory '4'
b) Gets all the articles in catagories with parent catagory '4'
(a) and (b) run fine on their own, but when i combine them with an OR statement, i get multiple (seemingly) redundant...
Hello, i've got an `id` column which auto_increments, but I also would like another column initially set to the same number as `id`.
Is this a sensible way of doing this on mySQL 4.0.26:
"INSERT INTO `bla` ( `id` , `id2`, `text`) VALUES ('', '', 'Bob'); UPDATE `bla` SET `id2`=LAST_INSERT_ID( )...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.