random1 Posted March 12, 2010 Share Posted March 12, 2010 Hey All, I'd like to check the syntax of each MySQL query I have in my PHP site. For example: checkMySQLSyntax($sql); with a return of true or false or "Error Message String". I've found some sites: http://developer.mimer.se/validator/parser200x/index.tml http://www.w3.org/2005/01/yacker/uploads/MySQL?lang=perl Link to comment https://forums.phpfreaks.com/topic/194979-function-to-check-sytax-of-mysql-query/ Share on other sites More sharing options...
trq Posted March 12, 2010 Share Posted March 12, 2010 Do you have a question? Link to comment https://forums.phpfreaks.com/topic/194979-function-to-check-sytax-of-mysql-query/#findComment-1025071 Share on other sites More sharing options...
random1 Posted March 12, 2010 Author Share Posted March 12, 2010 Yep. Is there a way to do this in PHP and what kinda functions are required to check a string as valid SQL? Link to comment https://forums.phpfreaks.com/topic/194979-function-to-check-sytax-of-mysql-query/#findComment-1025076 Share on other sites More sharing options...
trq Posted March 12, 2010 Share Posted March 12, 2010 There is no built in php function to do this without actually executing a query. Link to comment https://forums.phpfreaks.com/topic/194979-function-to-check-sytax-of-mysql-query/#findComment-1025086 Share on other sites More sharing options...
Tazerenix Posted March 12, 2010 Share Posted March 12, 2010 i asked the same question in the mysql section. No, there isnt any way to check the syntax Link to comment https://forums.phpfreaks.com/topic/194979-function-to-check-sytax-of-mysql-query/#findComment-1025094 Share on other sites More sharing options...
random1 Posted March 12, 2010 Author Share Posted March 12, 2010 Thanks all Link to comment https://forums.phpfreaks.com/topic/194979-function-to-check-sytax-of-mysql-query/#findComment-1025398 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.