PHP Classes

// Checking whether the line is a valid statement if(preg_mat...

Recommend this page to a friend!

      SQL Parsing  >  All threads  >  // Checking whether the line is a...  >  (Un) Subscribe thread alerts  
Subject:// Checking whether the line is a...
Summary:Package rating comment
Messages:3
Author:Kyle Shenk
Date:2008-10-31 16:39:11
Update:2010-02-10 15:55:00
 

Kyle Shenk rated this package as follows:

Utility: Insufficient
Consistency: Sufficient
Examples: Not sure

  1. // Checking whether the line is a...   Reply   Report abuse  
Picture of Kyle Shenk Kyle Shenk - 2008-10-31 16:39:11
// Checking whether the line is a valid statement
if(preg_match("/(.*);/", $sql_line))

^ that is not checking to see whether the line is valid or not. That's simply saying any character, 0 or more times ending in a semi colon. I really don't know why this is even on here.

  2. Re: // Checking whether the line is a...   Reply   Report abuse  
Picture of Timo Witte Timo Witte - 2010-02-10 15:46:19 - In reply to message 1 from Kyle Shenk
this is just waste of CPU *g*

  3. Re: // Checking whether the line is a...   Reply   Report abuse  
Picture of Timo Witte Timo Witte - 2010-02-10 15:55:00 - In reply to message 2 from Timo Witte
actually "INSERT INTO bla SET blubb = 'hey i love ; semicolons'" would also turn out as true which is not correct i think. should be a $ in the end as "end of line"