Storing NOW() mysql to a variable?
#1

Is it possible to store MySQL's NOW() Date & Time function to a variable?

PHP код:
mysql_format(mysqlquerysizeof(query), "INSERT INTO `accounts` (`NAME`, `REGISTRATION`, `IP`, `PASSWORD`, `SALT`) VALUES ('%e', NOW(), '%s', '%s', '%e')"PlayerInfo[playerid][p_Name], PlayerInfo[playerid][p_newIP], PlayerInfo[playerid][p_Password], PlayerInfo[playerid][p_Salt]);
mysql_tquery(mysqlquery"OnPlayerRegister""d"playerid); 
Reply
#2

Insert it and fetch the result from the DB through cache.
Reply
#3

Not quite sure if I did it right, I am quite new in terms of mySQL so please excuse me.

Did I do it right?

PHP код:
mysql_format(mysqlquerysizeof(query), "SELECT `REGISTRATION` FROM `accounts` WHERE `NAME` = '%e' LIMIT 1"PlayerInfo[playerid][p_Name]);
mysql_tquery(mysqlquery"RegistrationCache""d"playerid); 
I have placed it under INSERT INTO and it seems to be working fine, but performance-wise (for the server), is it good?
Reply
#4

Just asking but errr... I guess it is okay then?
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)