Jump to content

jofabian

Members
  • Posts

    1
  • Joined

  • Last visited

jofabian's Achievements

Seeker

Seeker (1/7)

0

Reputation

  1. Maybe you wanna add this to EzMySql.au3 Func _EzMySql_Real_Escape_String($From, $FromLen = Default) If Not $hEzMySql_Ptr Then Return SetError(1, 0, 0) If $FromLen <= 0 Or $FromLen = Default Then $FromLen = StringLen($From) Local $TO = DllStructCreate("char[" & $FromLen * 2 + 1 & "]") Local $query = DllCall($hEzMySql_Dll, "int", "mysql_real_escape_string", "ptr", $hEzMySql_Ptr, "ptr", DllStructGetPtr($TO), "str", $From, "ulong", $FromLen) If @error Then Return SetError(2, 0, 0) Return StringLeft(DllStructGetData($TO, 1), $query[0]) EndFunc This function allow me to escape some strings before I send them in a query to MySQL. I did copy this from ">MySQL UDFs (without ODBC)" and adapted it to EzMySql, it works for me but maybe the autor of EzMySql should take a look of it. Good Luck.
×
×
  • Create New...