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

SQL Query:
Код:
[04:53:10] INSERT INTO gc_inventery_prop (id,itemid,itemnum,itemlocal,localID,ownproid,openid,itemcontent,Weight) VALUES (24999,0,0,properties,249,0,0,'',0)
[04:53:10] Unknown column 'properties' in 'field list'
Код:
			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]);
Reply
#2

Replace `properties` with 'properties'
Reply
#3

Quote:
Originally Posted by Konstantinos
Посмотреть сообщение
Replace `properties` with 'properties'
still bugged and warned this prob.

bizz's goods is not saving idk why.
Reply
#4

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.
Reply
#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
#6

Код:
[05:20:16] CMySQLHandler::Query(UPDATE users SET on‌line = 1 WHERE LOWER(username) = LOWER('Shadowkillahasd');) - Successfully executed.

[05:20:16] >> mysql_free_result( Connection handle: 1 )

[05:20:16] CMySQLHandler::FreeResult() - Result was successfully free'd.

[05:20:19] >> mysql_query( Connection handle: 1 )

[05:20:19] CMySQLHandler::Query(UPDATE properties SET Owner='SYSTEM',OwnGroup='LS GOV',OwnGroupID=26,Location=0,Locked=0,Shopping=1,Getting=1,GetType='None',cash=-1248904248,baseprice=330545,enterfee=0,fee=0,name='CITY HALL',pIcon=1273,MapIcon=19,enX=1481.034667,enY=-1770.273193,enZ=18.795755,enA=0.000000,Basepos=0,PriceRate=4.079998,GetRate=3.740000,uniqIntId=14,havefire=0,TargetInt=-1,TargetProcess=0 WHERE id=248) - Successfully executed.

[05:21:52] >> mysql_query( Connection handle: 1 )

[05:21:52] CMySQLHandler::Query(INSERT INTO gc_inventery_prop (id,itemid,itemnum,itemlocal,localID,ownproid,openid,itemcontent,Weight) VALUES (21000,276,10,`properties`,210,0,0,'',0)) - An error has occured. (Error ID: 1054, Unknown column 'properties' in 'field list')

[05:21:52] >> mysql_insert_id( Connection handle: 1 )

[05:21:52] >> mysql_query( Connection handle: 1 )

[05:21:52] CMySQLHandler::Query(INSERT INTO gc_inventery_prop (id,itemid,itemnum,itemlocal,localID,ownproid,openid,itemcontent,Weight) VALUES (21001,277,10,`properties`,210,0,0,'',0)) - An error has occured. (Error ID: 1054, Unknown column 'properties' in 'field list')

[05:21:52] >> mysql_insert_id( Connection handle: 1 )

[05:21:52] >> mysql_query( Connection handle: 1 )

[05:21:52] CMySQLHandler::Query(INSERT INTO gc_inventery_prop (id,itemid,itemnum,itemlocal,localID,ownproid,openid,itemcontent,Weight) VALUES (21002,288,10,`properties`,210,0,0,'',0)) - An error has occured. (Error ID: 1054, Unknown column 'properties' in 'field list')

[05:21:52] >> mysql_insert_id( Connection handle: 1 )

[05:21:52] >> mysql_query( Connection handle: 1 )

[05:21:52] CMySQLHandler::Query(INSERT INTO gc_inventery_prop (id,itemid,itemnum,itemlocal,localID,ownproid,openid,itemcontent,Weight) VALUES (21003,289,10,`properties`,210,0,0,'',0)) - An error has occured. (Error ID: 1054, Unknown column 'properties' in 'field list')

[05:21:52] >> mysql_insert_id( Connection handle: 1 )

[05:21:52] >> mysql_query( Connection handle: 1 )

[05:21:52] CMySQLHandler::Query(INSERT INTO gc_inventery_prop (id,itemid,itemnum,itemlocal,localID,ownproid,openid,itemcontent,Weight) VALUES (21004,290,10,`properties`,210,0,0,'',0)) - An error has occured. (Error ID: 1054, Unknown column 'properties' in 'field list')

[05:21:52] >> mysql_insert_id( Connection handle: 1 )

[05:21:52] >> mysql_query( Connection handle: 1 )

[05:21:52] CMySQLHandler::Query(UPDATE properties SET Owner='SYSTEM',OwnGroup='LS GOV',OwnGroupID=-1,Location=0,Locked=0,Shopping=1,Getting=0,GetType='Pizza stack',cash=298350,baseprice=203254,enterfee=0,fee=0,name='Idlewood Pizza stack',pIcon=1273,MapIcon=29,enX=2104.495605,enY=-1806.595214,enZ=13.554677,enA=0.000000,Basepos=0,PriceRate=1.000000,GetRate=0.500000,uniqIntId=22,havefire=0,TargetInt=-1,TargetProcess=0 WHERE id=210) - Successfully executed.
Reply
#7

I assume those messages were printed are from the callback. As you use the old, old version of the plugin, you can enable debug by calling:
pawn Код:
mysql_debug(1);
and you'll get a mysql_log.txt file. Also uncomment this line:
pawn Код:
//print(str);
and let's see if it printed the query correctly.

EDIT: In the above, it's still `properties`
Reply
#8

Quote:
Originally Posted by Konstantinos
Посмотреть сообщение
I assume those messages were printed are from the callback. As you use the old, old version of the plugin, you can enable debug by calling:
pawn Код:
mysql_debug(1);
and you'll get a mysql_log.txt file. Also uncomment this line:
pawn Код:
//print(str);
and let's see if it printed the query correctly.

EDIT: In the above, it's still `properties`
well.. mysql_debug doesnt working, goods is still not saveable and no errors and warnnings it's weird!
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)