13.06.2018, 13:15
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
help please i want it so i dont have to define that again and again and it work in both
localhost and server host
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
localhost and server host