MySQL help
#1

i am just new in mysql but i got it better alot in making systems etc etc
but i want to know that how can i make it based for 2 hosts like
if defined server_host
#define MYSQL_HOST ""
#define MYSQL_USER ""
#define MYSQL_PASS ""
#define MYSQL_DB ""

load this information but if Localhost defined then use the other one

like i tried by this
PHP код:
#define LOCAL_HOST
#define SERVER_HOST
#if defined SERVER_HOST
/* Mysql Entities */
#define MYSQL_HOST    ""
#define MYSQL_USER    ""
#define MYSQL_PASS     ""
#define MYSQL_DB    ""
/* Mysql Entities */
#endif
#if defined LOCAL_HOST
/* Local Host */
#define MYSQL_HOST    ""
#define MYSQL_USER    ""
#define MYSQL_PASS     ""
#define MYSQL_DB    ""
/* Local Host */
#endif 
help please i want it so i dont have to define that again and again and it work in both
localhost and server host
Reply


Messages In This Thread
MySQL help - by CaptainBoi - 13.06.2018, 13:15
Re: MySQL help - by Slawi - 13.06.2018, 13:50
Re: MySQL help - by CaptainBoi - 13.06.2018, 15:01

Forum Jump:


Users browsing this thread: 1 Guest(s)