Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // Author : s.schnitzler
- // Create Date : 18.01.2012
- local mySqlUsername = "horst";
- local mySqlPassword = "horstsecretpw";
- local mySqlHostname = "horst.de";
- local mySqlDatabase = "horstdb";
- local mysql;
- local _OldMysql_Query = mysql_query;
- function mysql_query(connection, query)
- {
- if(mysql)
- { //Db verbindung funktioniert
- return _OldMysql_Query(mysql, query);
- }
- else
- { //Net wirklich
- mysql = mysql_connect(mySqlHostname, mySqlUsername, mySqlPassword, mySqlDatabase);
- return _OldMysql_Query(mysql, query);
- }
- }
Add Comment
Please, Sign In to add comment