|
|
 geert van bommel | 2009-11-07 11:37:45 |
Hi,
I would like to give this class a test drive, but I tried to install it and got the error that function SQLEnCode() is undefined. I can't find the function in any of the files either.
Also, it would be great if there were some examples on how to use the class. It's a very interesting concept.
Kind Regards,
Geert |
| |
2. Re: installation |
|
Reply |
|
|
 Michael J. Fuhrman | 2009-11-07 14:13:50 - In reply to message 1 from geert van bommel |
Geert,
SQL Encode should have been in the Function.inc file. Unfortunately, I pulled it, since PHP has a similar function (mysql_real_escape_string) and apparently didn't update my code.
Provided here is the function. I will include it in the class library as well.
Mike,
Function SQLEncode ($szString)
{
$szRtn = "";
$nlen = strLen($szString);
If ($nlen == 0) return;
For ($t = 0; $t < $nlen; $t++)
{
$szChar = substr($szString, $t, 1);
$szRtn .= $szChar;
If ($szChar == "'") $szRtn .= $szChar;
}
return ($szRtn);
}
|
|