moxicon
-
Posts
3 -
Joined
-
Last visited
Never
Posts posted by moxicon
-
-
"printf" hinted at something very important that needs to be addressed. You MUST escape the values that get inserted into your query string. In this case, mysql_real_escape_string(). Whithout doing so, you may be opening your script up to SQL Injection attacks at worst, or a sometimes failing query at best. Please do not save this step for later.
-
Functions don't work inside HEREDOCs. Also, the curly braces are unnecessary in your example.
Whats the deal with mysql_query() || or OR
in PHP Coding Help
Posted
$result = "0" || 0 || false || "hello"; // $result becomes TRUE
$result = "0" OR 0 OR false OR "hello" ; $result becomes "0"
Just don't use '||' to do what you're trying to do.