This page cannot be shown here. You can still read it on the original site — the toolbar below keeps your place in the directory.
The code below allows to retrieve and execute all SQL statements defined in a SQL script file removing all comments. <? php $sql_file = 'test.sql' ; $contents = file_get_contents ( $sql_file ); // Remove C style and inline comments $comment_patterns = array ( '/\/\*.*(\n)*.*(\*\/)?/' , //C comments '/\s*--.*\n/' , //inline comments start with -- '/\s*#.*\n/' , //inline comments start with # );…
Comments
Nothing yet. Say the first thing.
Sign in to join the conversation.