Browse code

Strings für mysql esapen (zentral!)

git-svn-id: https://svn.schokokeks.org/repos/tools/webinterface/trunk@598 87cf0b9e-d624-0410-a070-f6ee81989793

bernd authored on08/08/2007 13:02:21
Showing1 changed files
... ...
@@ -21,7 +21,7 @@ function db_query($query)
21 21
 function maybe_null($value)
22 22
 {
23 23
   if (strlen( (string) $value ) > 0)
24
-    return "'{$value}'";
24
+    return "'".mysql_real_escape_string($value)."'";
25 25
   else
26 26
     return 'NULL';
27 27
 }