Saving a string to MySQL
#6

Код:
SaveSQLStr(HouseData[houseid][HouseID], "houses", "OwnerName", HouseData[houseid][HouseOwnerName]);

Server:SaveSQLStr(sqlid, table[], row[], value)
{
	new query[500];
	mysql_format(sqlBaglanti, query, sizeof query, "UPDATE %e SET %e = '%s' WHERE id = '%i'", table, row, value, sqlid);
	mysql_pquery(sqlBaglanti, query);
	return true;
}

'value' is not a type string

And replace with:

SaveSQLStr(HouseData[houseid][HouseID], "houses", "OwnerName", houseid);

Server:SaveSQLStr(sqlid, table[], row[], value)
{
	new query[500];
	mysql_format(sqlBaglanti, query, sizeof query, "UPDATE `%s` SET `%s` = '%s' WHERE `id` = '%d'", table, row, value, sqlid);
	mysql_tquery(sqlBaglanti, query, "", "");
	return true;
}
Reply


Messages In This Thread
Saving a string to MySQL - by UnlikePluto - 25.06.2017, 12:41
Re: Saving a string to MySQL - by Vince - 25.06.2017, 12:53
Re: Saving a string to MySQL - by Abagail - 25.06.2017, 12:54
Re: Saving a string to MySQL - by UnlikePluto - 25.06.2017, 13:03
Re: Saving a string to MySQL - by Abagail - 25.06.2017, 13:19
Re: Saving a string to MySQL - by skuller12 - 25.06.2017, 15:29

Forum Jump:


Users browsing this thread: 1 Guest(s)