Hi!
This is for eascape Illegal chars in sql , for I use mysql_real_eascape() in libmysql.dll not cuccess.
function escape($str)
{
$search=array("\\","\0","\n","\r","\x1a","'",'"');
$replace=array("\\\\","\\0","\\n","\\r","\Z","\'",'\"');
return str_replace($search,$replace,$str);
}
Or :
mysql.c add
HB_FUNC( SQLEASCAPE )
{
mysql_real_escape_string( (MYSQL *)_parnl(1), _parc(2), _parc(3), _parnl(4) ) ;
hb_retc( _parc(2)) ;
}
in prg
?SQLEASCAPE(oserver:nsocket,,"Zak's")
Want to be: "Zak\'s "
Regards !
Shuming Wang