Guest User

Untitled

a guest
May 27th, 2018
157
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.54 KB | None | 0 0
  1. // Author : s.schnitzler
  2. // Create Date : 18.01.2012
  3.  
  4. local mySqlUsername = "horst";
  5. local mySqlPassword = "horstsecretpw";
  6. local mySqlHostname = "horst.de";
  7. local mySqlDatabase = "horstdb";
  8.  
  9. local mysql;
  10. local _OldMysql_Query = mysql_query;
  11.  
  12. function mysql_query(connection, query)
  13. {
  14. if(mysql)
  15. { //Db verbindung funktioniert
  16. return _OldMysql_Query(mysql, query);
  17. }
  18. else
  19. { //Net wirklich
  20. mysql = mysql_connect(mySqlHostname, mySqlUsername, mySqlPassword, mySqlDatabase);
  21. return _OldMysql_Query(mysql, query);
  22. }
  23. }
Add Comment
Please, Sign In to add comment