» Quick Links
You can make money on these forums
We Share profits with you
Google
Google Adsense
Google Adwords
YPN
Yahoo
MSN Search
Web Directories
Web Hosting
Web Hosting Offers
Hosting News
Suggestions
Link Building
Domain Names
PHP Forums
MySQL Forums
» More Links
OSP News
Reseller Hosting
Shared Hosting
Dedicated Servers
Google Adsense
Search Engine Marketing
Link Development
Affiliate Marketing


» Advertising
Multiple DC PR Check

Free SEO Tools


Go Back   Webmaster Forums > Website Developement / Programming > MySQL Forums

MySQL Forums Share Your Ideas and Tips about MYSQL. Ask questions about MYSQL. Table Design and Much More...

Reply
 
Thread Tools Display Modes
  #1  
Old 07-31-2006, 03:08 PM
parore parore is offline
Junior Member
 
Join Date: Jul 2006
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Rep Power: 0
parore is on a distinguished road
Default Query works on production but not on testing server

Hello guys

I know it's probrably a difference in mySQL version (5.0.20 on testing and 4.1.20 on production), either that or just plain old bad SQL (which I'm quite good at) - (making bad SQL not just good at SQL) - but I'm interested to hear any feedback on why this is, and if it should be done a different way to be compatible with both.

My query is:

Code:
SELECT `a1`.`VI_PK` , `a2`.`name` , `b2`.`VRI_PK`
FROM `tbl_vendor_recipe` `b1`
INNER JOIN `tbl_vendor_recipe_ingredients` `b2` ON ( `b1`.`VR_PK` = `b2`.`VR_ID` )
RIGHT OUTER JOIN `tbl_vendor_product` `a1` ON ( `b2`.`VI_ID` = `a1`.`VI_PK` )
INNER JOIN `tbl_master_items` `a2` ON ( `a1`.`MI_ID` = `a2`.`MI_PK` )
WHERE (
`a1`.`V_ID` = '8'
)
AND (
`a2`.`MT_ID` = '1'
)
AND (
`b1`.`VR_PK` = '286'
)
ORDER BY `a2`.`name`

Messy with the aliases I know, but i'm not the best with SQ -- This message may have been cut off and the rest will only be shown to members. To become a member, click here --
Reply With Quote
Revenue Sharing Ads ( ?):
  #2  
Old 07-31-2006, 03:11 PM
vibrant vibrant is offline
OSP Addicts
 
Join Date: Jul 2006
Posts: 103
Thanks: 0
Thanked 0 Times in 0 Posts
Rep Power: 16
vibrant will become famous soon enough
Default

I hate RIGHT OUTER JOINs, especially when they're mixed in the middle of a string of INNER JOINs

Could you please indicate the one-to-many relationships here?

Thanks and bye -- This message may have been cut off and the rest will only be shown to members. To become a member, click here --
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
server query PowerX Dedicated Servers 1 01-15-2007 06:45 AM
testing server, need help?? wilmer MySQL Forums 1 09-18-2006 06:46 AM
testing a server! Aldo Web Hosting Industry 1 08-10-2006 03:39 AM
Mighty Server Upgrades Dedicated Server Plan outsourcingplans Web Hosting Industry 0 02-14-2006 10:20 PM
VMware Introduces Free VMware Server outsourcingplans Web Hosting Industry 0 02-06-2006 09:54 PM


All times are GMT. The time now is 12:17 PM.