I’ve gotten PHx installed but when I enable it and attempt to use is, I get this error.
MODx encountered the following error while attempting to parse the requested resource:
« Execution of a query to the database failed - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ’’phx:%M’’’ at line 1 »
SELECT snippet FROM `site_snippets` WHERE `site_snippets`.name=’phx:%M’’
Is there a snippet I need to add? There is nothing about this in the install documentation. What do I put in there?
--
Modx 2.0.2
Win 7 Firefox 3.6.10
Mac Snow Leopard Firefox 3.5.12
Presumably you have no table prefix set here, other than that there seems to be a trailing quote on your select statement, but this could just be a paste error in the post.
This works OK on my installation :-
SELECT snippet FROM `modx_site_snippets` WHERE `modx_site_snippets`.name=’phx:%M’
Use MODx, or the cat gets it!
I took out the prefixs when I pasted the error message. I don’t think there is anything wrong with the SQL statement, I just don’t have a record available. What happens if you run your statement in MySQL? I’m thinking there needs to a snippet record available, I just don’t know what is suppose to be there. I didn’t see an example snippet or even a mention of it in the documentation.
Apparently, the code on the PHx site has a bug with the extra tick. I removed it and now it is working.
--
Modx 2.0.2
Win 7 Firefox 3.6.10
Mac Snow Leopard Firefox 3.5.12
There must be something wrong with your install. This query is looking for phx modifiers (they are identified with phx: prefix). It should not fail if there are no modifiers.