42 Responses to “Stored Procedures Auto Generator”

  1. Anas Al-Far says:

    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.

  2. Abedelhadi shajrawi says:

    Spero che tutti i migliori, l’uomo, grazie per questa classe inshallah io uso nel mio lavoro:) .. Dispiace per il primo commento

  3. Anas Al-Far says:

    Non ti preoccupare “Abdelhadi”, I’ll eliminarlo.

  4. Matrex says:

    any sample how to use this script ?

    tnx :)

  5. Anas Al-Far says:

    Sorry :)
    Pleae check the post again, I have added “How to”.
    Thanks.

  6. Matrex says:

    nice … it works fine

    tnx

  7. dante says:

    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’);

  8. Anas Al-Far says:

    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.

  9. raindeer says:

    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

  10. Alex says:

    Your blog is interesting!

    Keep up the good work!

  11. christian says:

    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?

  12. pokemon says:

    Cool blog.
    Thanks, webmaster.

  13. Marina says:

    Beautiful design.
    Thanks, webmaster.

  14. Pavel says:

    Amazing site.
    Thanks, webmaster.

  15. proslaviy says:

    Hi, how I can send PM?

  16. Effilet says:

    Excellent design, Tnks webmaster.

  17. Raj Gohil says:

    This is very helpful.

  18. myname says:

    you might want to consider installing a spam filter on your blog =)

  19. Thanks you script really helped me chew in a lot of work . cheers .

  20. samir says:

    i got urs auot generate stored procedur. but how can i run php file to generat stored procedure.

  21. Anas Al-Far says:

    Samir: are you using Windows/Linux OS? also, do you have any PHP editor installed? or any development package like AppServ?

  22. samir says:

    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

  23. Anas Al-Far says:

    Samir:
    ok, you just need to create this directory on your machine:
    C:\xampp\htdocs\sql\sql\
    and make sure its writeable!

  24. Robert says:

    Thanks Anas al-Far,

    Your scripts saved me days worth of work.

    Keep up the great work!

    Robert

  25. AzuriVN says:

    This is my code:
    $generateSP = new storedProceduresAutoGenerator(‘localhost’, ‘root’, ”, ‘test’, ‘C:\wamp\www\sql\sql’);

    My dir: C:\wamp\www\sql\sql has already created, and is writeable.

    And when I exec this, this is my result:
    http://i833.photobucket.com/albums/zz251/AzuriVN/05-12-201010-24-40SA.jpg

    Plz help me :[.

    • Anas Al-Far says:

      could you check if there’s set_time_limit in my code ? if not, please use set_time_limit(0) in the beginning of the file.

  26. AzuriVN says:

    That error occurred when I used Wamp Server.
    When I change to Xamp Server, it works fine.

    So I think I have to config something in php.ini to run this code.

    Btw, thank for your class, it is very helpful :D .

  27. Anas Al-Far says:

    Great, and you are welcome :)

  28. Mike S. says:

    Thanks for the code – I modified it a bit to fit my specific needs and it will save me a ton of time!

    • Anas Al-Far says:

      You are most welcome, please let me know if anything should be modified on my code.
      Also, I’ll add a class builder that calls those SPs soon -written in PHP- so keep n touch :)

  29. Tejal Shah says:

    This is really useful and time saving stuff.

    But can you provide some thing like http://www.tools4sql.net

    If you provide us something like that then it will be very much usefull.

    • Anas Al-Far says:

      i’m planning to do so, but i have something even better :)
      I’ll provide some classes written in PHP to call those SP.
      in shallah soon.

  30. When I was using MY SQL, I used this and it helped me lot. Gr8 work. Lots of Thanks.

    But Now I am using MS SQL Server 2008 so do you have or suggest any for the same?

  31. Raj Shah says:

    This is really very much helpful to MySQL Users.

    Can you please add one most important feature of Generating PK-FK Relation Stored Procedure?

    http://www.Tools4SQL.net generates it but it can be used only with MS SQL not My SQL or Oracle.

    So if you do so then it would be gr8 help.

  32. ahmed says:

    thanks for you
    really it’s very good idea
    a lot thanks for you

Leave a Reply

*