Q:

Android + php + mysql issue

I'm developing an Android application that has to communicate with external database. In order to achieve that i'm sending JSON data from my app to certain php page on the server and then php works by passing decoded data to the database's stored procedures.
It works with all procedures, but i have a problem with certain one. The procedure is throwing "You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 1" error. When i run that procedure from Navicat and pass as required BLOB argument manually:
"33bdf955c5d92555d8977eff1c5815c5#4efb80f630ccecb2d3b9b2087b0f9c89#"

everything works. When i try the same without the quotes on the beginning and the end the  error occurs.
On PHP side i'm decoding the JSON string mentioned above and i'm escaping it (mysql_escape_string) and passing it to the stored procedure and then i got the error. My stored procedure is expecting BLOB because passed text might be very long.
What am i doing wrong? How to overcome this error?

A:

"What should i use instead of "mysql_*?" – guest86

mysqli

