Stored Procedures Auto Generator
This is my new gift to the MySql Users, Administrators, Developers and any one looking or standard stored procedures and want to reduce development time as well.
My class generates standard stored procedures for every table in your database. So, If you have a MySql DB and needs to generate some standards procedures, I’m sure that you’ll find this script very very useful.
Once you run the script, you’ll notice that you have actually had a 5 stored procedures for each table in your database. Those stored procedures are:
- Get All Fields and Records From Table.
- Get All Fields From Table By Primary Key.
- Insert Into Table.
- Update Table By Primary Key.
- Delete from Table By Primary Key.
To download the class, please click here.
How to use it?
Please open the file in edit mode,� go to the end of file and edit this line with your configurations:
$generateSP = new storedProceduresAutoGenerator(’Your-DB-Server’, ‘Your-DB-Username’, ‘Your-DB-Password’, ‘Your-DB-Name’, ‘Any-Writable-Path-To-Generate-The-SP-Into’);
Save the file, and then just�run it.
Note: that the Stored Procedures Auto Generator Class has been released with source code under the LGPL free software license.
Thanks Taliba, I was able to translate your replay by google
Keep track of my blog, I’m working on a lot of such scripts that you’ll find more interest.
Spero che tutti i migliori, l’uomo, grazie per questa classe inshallah io uso nel mio lavoro:) .. Dispiace per il primo commento
Non ti preoccupare “Abdelhadi”, I’ll eliminarlo.
any sample how to use this script ?
tnx
Sorry
Pleae check the post again, I have added “How to”.
Thanks.
nice … it works fine
tnx
Warning: file_put_contents(C:/wamp\www\procedure\sql\GetAllUser.sql) [function.file-put-contents]: failed to open stream: No such file or directory in C:\wamp\www\procedure\storedProceduresAutoGenerator.php on line 394
what is wrong ?
$generateSP = new storedProceduresAutoGenerator(’localhost’, ‘root’, ”, ‘mysql’, ‘C:\wamp\www\procedure’);
Ok, fine.
Please create a folder named “sql”.
Right click on the folder.
Go to “Security Tab”.
Add “Everyone” user to the users list.
Give “read, write and execute” permission to “everyone” user.
Enjoy.
Nice site!
Hi,
the file cudnt be opened using winzip. its in .gz extension and it shows invalid archive directory. Can you point me where I am able to download it ?
Thanks
thank you, bro
Your blog is interesting!
Keep up the good work!
Let me begin by saying that i love your blog anas.al-far.com a lot
now.. back on topic hehe
I cant say that im 100% with what you typed up… care to explain deeper?
Cool blog.
Thanks, webmaster.
Beautiful design.
Thanks, webmaster.
Amazing site.
Thanks, webmaster.
Hi, how I can send PM?
Excellent design, Tnks webmaster.
This is very helpful.
Very nice site!
you might want to consider installing a spam filter on your blog =)
Very nice site!
Thanks you script really helped me chew in a lot of work . cheers .
i got urs auot generate stored procedur. but how can i run php file to generat stored procedure.
Samir: are you using Windows/Linux OS? also, do you have any PHP editor installed? or any development package like AppServ?
in autogenerate stored procedure . where i put storedprocedure.php in separate folder or else?
igot error like Warning: file_put_contents(C:\xampp\htdocs\sql\sql\UpdateZone_masterByID.sql) [function.file-put-contents]: failed to open stream: No such file or directory in C:\xampp\htdocs\bpb\storedproceduresautogenerator.php on line 390
Warning: chmod() [function.chmod]: No such file or directory in C:\xampp\htdocs\bpb\storedproceduresautogenerator.php on line 391
Warning: file_put_contents(C:\xampp\htdocs\sql\sql\InsertIntoZone_master.sql) [function.file-put-contents]: failed to open stream: No such file or directory in C:\xampp\htdocs\bpb\storedproceduresautogenerator.php on line 392
Warning: chmod() [function.chmod]: No such file or directory in C:\xampp\htdocs\bpb\storedproceduresautogenerator.php on line 393
Warning: file_put_contents(C:\xampp\htdocs\sql\sql\GetAllZone_master.sql) [function.file-put-contents]: failed to open stream: No such file or directory in C:\xampp\htdocs\bpb\storedproceduresautogenerator.php on line 394
Samir:
ok, you just need to create this directory on your machine:
C:\xampp\htdocs\sql\sql\
and make sure its writeable!