Jump to content

[SOLVED] Select Statement wont work in older MySQL


sKunKbad

Recommended Posts

I have a newer WAMP5 install on my computer, and the script I'm using works fine, but when I upload the script to the destination server, which has MySQL version 4.1.12, it doesn't work. It's hurting my head at this point, so I'm hoping for some help converting it to a select statement that will work. Here it is:

 

SELECT name, category, scent, size FROM general_widgets LEFT JOIN specific_widgets USING (gw_id) LEFT JOIN scents USING (scent_id) LEFT JOIN sizes USING (size_id) LEFT JOIN categories USING (category_id) WHERE sw_id=1

Link to comment
Share on other sites

I solved it. For reference in case anybody else has a similar problem, here is the converted SELECT statement:

 

SELECT name, category, scent, size
FROM general_widgets
LEFT JOIN specific_widgets ON ( general_widgets.gw_id = specific_widgets.gw_id ) 
LEFT JOIN scents ON ( specific_widgets.scent_id = scents.scent_id ) 
LEFT JOIN sizes ON ( specific_widgets.size_id = sizes.size_id ) 
LEFT JOIN categories ON ( general_widgets.category_id = categories.category_id ) 
WHERE specific_widgets.sw_id = 1

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.