[eluser]bojack[/eluser]
[quote author="OverZealous" date="1270689658"][quote author="sethbaur" date="1270688912"]
On my local server (MAMP on my MacBook) this works just find and for each "story" I can access its associated "link." As soon as this code was moved to the web host, it stopped working.[/quote]
Have you tried debugging any? What queries are being generated? Are they different, or the same?[/quote]
I work with Seth, and did some testing on this issue as well. Using this function:
SELECT `posts`.*, `categories`.`title` AS category_title, `categories`.`created` AS
category_created, `categories`.`updated` AS category_updated
FROM (`posts`)
LEFT OUTER JOIN
`categories` categories ON `categories`.`id` = `posts`.`category_id`
ORDER BY `posts`.`created` desc
--------
Events
Events
News
News
News
and this remotely:
Code:
SELECT `posts`.*, `categories`.`title` AS category_title, `categories`.`created` AS
category_created, `categories`.`updated` AS category_updated
FROM (`posts`)
LEFT OUTER JOIN
`categories` categories ON `categories`.`id` = `posts`.`category_id`
ORDER BY `posts`.`created` desc
--------
Another difference, if it's relevant, is that locally PHP is running as 'Apache 2.0 Handler', and remotely its 'CGI/FastCGI'. MySQL versions 5.1.37 (local) vs. 5.0.90 (remote).
-----------
EDIT: The issue is persistent with or without production cacheing.
EDIT: Same result if both systems are using the same DB config.