MySQL stored procedure in php code

Problems with the Windows version of XAMPP, questions, comments, and anything related.

MySQL stored procedure in php code

Postby logan » 31. October 2005 10:46

Well hello all the other english speaking people! :D

I have a question about implementing stored procedures via php. It is for security reasons, to try and prevent sql-injection from "breaking" my data.

I was wondering if anyone knew of ways to implement stored procedures, in a way to simulate it, other than relying on the MySQL to do it? (hope i am explaining it correctly). The people i host with are not being very helpfull in this area, so now i teach myself!


Any help will be appreciated or even if you can push me in the right direction to move to!

Thank you, in Advance
Posts: 4
Joined: 05. October 2005 13:14
Location: South Africa, Gauteng, Pretoria

Postby alucard01 » 01. November 2005 09:22


I prefer to using PHP rather than MySQL to prevent SQL injection.

You can go to and search for a function called:


and look at a function called quote_smart. You may get some help in there.

Hope it helps.
Posts: 122
Joined: 15. May 2005 13:51

Postby logan » 01. November 2005 09:56

Thank you for the input! 8)

I do use the mysql_real escape string. But i have given a few friends of mine the chance to see if they can get past my "newbie" security and they did (they like breaking into code). But i would like some more security.

Other things i do is to use md5 to hash passwords, replace some set characters like : and <> etc with white spaces. Also i run the input through a "sanitize" function of my own making and check the sanitized input to a copy of the original, if any changes has been made then i output a "nicely worded error" - not giving away too much information.

I am not sure if the above is a waste of time or secure in a way? :?:

I dont want to use MySQL to implement stored procedures, would rather simulate it using php! :D

I will take a look at this quote_smart function of yours! :)

Thank you again,
Posts: 4
Joined: 05. October 2005 13:14
Location: South Africa, Gauteng, Pretoria

Return to XAMPP for Windows

Who is online

Users browsing this forum: No registered users and 71 guests