MySQL Inserting...
#1

Well i had to do this because of the error input size too long so i needed to ask...
Is this the best way to do this? I mean is there any better way doing this because it doesn't seem perfect so if you guys can help me out and tell me is it good or bad..

Код:
new query[512], query2[512];
	mysql_format(mysql, query, sizeof(query), "INSERT INTO `"TABLE_HOUSES"` (`Price`, `Owned`, `Owner`, `EntX`, `EntY`, `EntZ`, `ExX` ,`ExY`, `ExZ`, `VirWorld`, `Int`)");
	mysql_format(mysql, query2, sizeof(query2), "VALUES ('%d', '%d', '%s', '%f', '%f', '%f', '%f', '%f', '%f', '%d', '%d')",\
 	HouseInfo[HouseID][Price], HouseInfo[HouseID][Owned], HouseInfo[HouseID][Owner], HouseInfo[HouseID][EntX], HouseInfo[HouseID][EntY], HouseInfo[HouseID][EntZ], HouseInfo[HouseID][ExX], HouseInfo[HouseID][ExY],\
  	HouseInfo[HouseID][ExZ], HouseInfo[HouseID][VirtualWorld], HouseInfo[HouseID][Interior]);
    strcat(query, query2);
	mysql_query(mysql, query);
Thanks.
Reply


Messages In This Thread
MySQL Inserting... - by Runn3R - 06.09.2014, 07:20
Re: MySQL Inserting... - by AMouldyLemon - 06.09.2014, 07:32
Re: MySQL Inserting... - by Runn3R - 06.09.2014, 07:37
Re: MySQL Inserting... - by AMouldyLemon - 06.09.2014, 07:42
Re: MySQL Inserting... - by Runn3R - 06.09.2014, 07:46

Forum Jump:


Users browsing this thread: 3 Guest(s)