HELP MYSQL: Unknown column 'properties' in 'field list'
#5

Quote:
Originally Posted by Konstantinos
Посмотреть сообщение
Do you get any warning/error in mysql_log? You may also print the query and run the output through phpmyAdmin to see if it gets inserted successfully.
mysql_log? euh.. i don't have that log but i'm gonna see, here's all function to save bizz's goods and the problem is insert a new one into db.

when i'm adding the goods by ig dialog it's all fine then i closed the server and restart it well.. all the datas are gone away.

Код:
DB_SavePropBag(propid){

	printf("【DB】Saving%d's goods",propid);
	new str[256];
	new prop_id = properties[propid][eID];
	new PItemStart = prop_id * MAX_PROPBAG;
	
	for(new i=0;i<MAX_PROPBAG;i++)
	{
		if(PropBag[propid][i][Wid]==SQL_NEW)//insert a new line
		{
			format(str, sizeof(str), "INSERT INTO gc_inventery_prop (id,itemid,itemnum,itemlocal,localID,ownproid,openid,itemcontent,Weight) VALUES (%d,%d,%d,'properties',%d,%d,%d,'%s',%d)",
				i+PItemStart,PropBag[propid][i][Witemid],PropBag[propid][i][Witemnum],properties[propid][eID],PropBag[propid][i][Wownproid],PropBag[propid][i][Wopenid],PropBag[propid][i][Witemcontent],PropBag[propid][i][WWeight]);
			//print(str);
			mysql_query( str );
			PropBag[propid][i][Wid] = mysql_insert_id();
		}else if(PropBag[propid][i][Wid]>0){//update the data
			format(str, sizeof(str), "UPDATE gc_inventery_prop SET itemid=%d,itemnum=%d,ownproid=%d,openid=%d,localID=%d,itemcontent='%s',Weight=%d,ItemHealth=%d WHERE ID = %d",
				PropBag[propid][i][Witemid],PropBag[propid][i][Witemnum],PropBag[propid][i][Wownproid],PropBag[propid][i][Wopenid],propid,PropBag[propid][i][Witemcontent],PropBag[propid][i][WWeight],PropBag[propid][i][WItemHealth],i+PItemStart);
			//print(str);
			mysql_query( str );
		}
	}
}
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)