05.05.2014, 13:26
Very nice, but i can shortd this,
with (,) Example,
Overall, nice
PHP Code:
format(query, sizeof(query), "UPDATE `houseinfo` SET `outX`='%f' WHERE `hID`=%d", House[h][outX], h);
mysql_query(query);
format(query, sizeof(query), "UPDATE `houseinfo` SET `outY`='%f' WHERE `hID`=%d", House[h][outY], h);
mysql_query(query);
format(query, sizeof(query), "UPDATE `houseinfo` SET `outZ`='%f' WHERE `hID`=%d", House[h][outZ], h);
mysql_query(query);
format(query, sizeof(query), "UPDATE `houseinfo` SET `intX`='%f' WHERE `hID`=%d", House[h][intX], h);
mysql_query(query);
format(query, sizeof(query), "UPDATE `houseinfo` SET `intY`='%f' WHERE `hID`=%d", House[h][intY], h);
mysql_query(query);
format(query, sizeof(query), "UPDATE `houseinfo` SET `intZ`='%f' WHERE `hID`=%d", House[h][intZ], h);
mysql_query(query);
format(query, sizeof(query), "UPDATE `houseinfo` SET `intINT`='%d' WHERE `hID`=%d", House[h][intINT], h);
mysql_query(query);
PHP Code:
"UPDATE `houseinfo` SET `outX`='%f',`outY`='%f',outZ`='%f', WHERE `hID`=%d'", House[h][outX], House[h][outY], House[h][outZ],h