PHP Classes


Recommend this page to a friend!

      Ladder PHP  >  All threads  >  installation  >  (Un) Subscribe thread alerts  
Summary:Call to undefined function SQLEnCode() in ..../Ladder_Item.cls
Author:geert van bommel
Date:2009-11-07 11:37:45
Update:2009-11-07 14:13:50

  1. installation   Reply   Report abuse  
Picture of geert van bommel geert van bommel - 2009-11-07 11:37:45

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,

  2. Re: installation   Reply   Report abuse  
Picture of Michael J. Fuhrman Michael J. Fuhrman - 2009-11-07 14:13:50 - In reply to message 1 from geert van bommel

SQL Encode should have been in the 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.


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);