I’ve got an installation of version 1.5.2 built 20070404. I made a plugin to return some very specific results from the database (it has nested SQL calls which isn’t the smartest way to do it, but it was a quick and dirty thing).
I am printing out the SQL query before calling it, and if I take the SQL query and run it directly on the database it returns the correct results. If I run it from within the plugin it returns an empty set (no results). Here’s the SQL query itself:
SELECT DISTINCT (
d.field_id_5
) AS company
FROM exp_weblog_data AS d
JOIN exp_weblog_titles AS t ON t.entry_id = d.entry_id
WHERE t.status = 'open'
AND t.expiration_date > '1214850706'
AND (
d.field_id_10 > '1214850706'
OR d.field_id_10 = '0'
)
AND d.field_id_101 = 'Retail/Wholesale'
ORDER BY d.field_id_5
Is this something that might be fixed up upgrading? It really isn’t an option to upgrade the whole site at this point (at least not without charging the client which I don’t want to do) - is it possible to grab a newer version of ‘db.mysql.com’ or something similar (if it isn’t against the license that is…
Let me know if you’d like to see the php itself. Thanks for any help!
Moved to Plugins: Technical Assistance by Moderator
