[SQL-WEIRD][Print]Come explain please
#1

hey my code

PHP Code:
stock SaveHouse(id)
{
    if(!
Iter_Contains(Housesid)) return 0;
    
mysql_format(gSQLHandlequerysizeof(query), "UPDATE houses SET HouseName='%s', HouseOwner='%s', HousePassword='%s', HouseLock=%d, HouseMoney=%d, LastEntered=%d WHERE ID=%d",
    
HouseData[id][Name], HouseData[id][Owner], HouseData[id][Password], HouseData[id][LockMode], HouseData[id][SafeMoney], HouseData[id][LastEntered], id);
    
mysql_tquery(gSQLHandlequery"""");
    
HouseData[id][Save] = false;
    return 
1;

This not work i meant it not save but when i put the print like this

PHP Code:
stock SaveHouse(id)
{
    if(!
Iter_Contains(Housesid)) return 0;
    
mysql_format(gSQLHandlequerysizeof(query), "UPDATE houses SET HouseName='%s', HouseOwner='%s', HousePassword='%s', HouseLock=%d, HouseMoney=%d, LastEntered=%d WHERE ID=%d",
    
HouseData[id][Name], HouseData[id][Owner], HouseData[id][Password], HouseData[id][LockMode], HouseData[id][SafeMoney], HouseData[id][LastEntered], id);
    print(
query); //<<<< here
    
mysql_tquery(gSQLHandlequery"""");
    
HouseData[id][Save] = false;
    return 
1;

It Workkk(it saved) when i put the print like this

i don't really know why can someone explain this please i get confused over it
Reply
#2

Bumping never seen problemm!!!!!!!!!!!!!!
Reply
#3

Work this so?
PHP Code:
stock SaveHouse(id)
{
    if(!
Iter_Contains(Housesid)) return 0;
    
mysql_format(gSQLHandlequerysizeof(query), "UPDATE houses SET HouseName='%s', HouseOwner='%s', HousePassword='%s', HouseLock=%d, HouseMoney=%d, LastEntered=%d WHERE ID=%d",
    
HouseData[id][Name], HouseData[id][Owner], HouseData[id][Password], HouseData[id][LockMode], HouseData[id][SafeMoney], HouseData[id][LastEntered], id);
    
HouseData[id][Save] = false;
    
mysql_tquery(gSQLHandlequery"""");
    return 
1;

Mencent
Reply
#4

wait
Reply
#5

nope not workkkkk

Quote:

stock SaveHouse(id)
{
if(!Iter_Contains(Houses, id)) return 0;
mysql_format(gSQLHandle, query, sizeof(query), "UPDATE houses SET HouseName='%s', HouseOwner='%s', HousePassword='%s', HouseLock=%d, HouseMoney=%d, LastEntered=%d WHERE ID=%d",
HouseData[id][Name], HouseData[id][Owner], HouseData[id][Password], HouseData[id][LockMode], HouseData[id][SafeMoney], HouseData[id][LastEntered], id);
print(query); //<<<< here
mysql_tquery(gSQLHandle, query, "", "");
HouseData[id][Save] = false;
return 1;
}

This still work with no reason
Reply
#6

Hmm, sorry, I do not know the solution then, but you can leave it so ^^
Maybe someone else knows the answer.

Mencent
Reply
#7

bumppppp
Reply
#8

Could you show your mysql log contents after running that function?
Reply
#9

ok i'll show
Reply
#10

Quote:
Originally Posted by Misiur
View Post
Could you show your mysql log contents after running that function?
Console input: exit
[16:29:04] --- Server Shutting Down.
[16:29:04] UPDATE houses SET HouseName='House For Sale', HouseOwner='Bug_Findsss', HousePassword='2345', HouseLock=1, HouseMoney=0, LastEntered=1428658112 WHERE ID=0
[16:29:04] UPDATE houses SET HouseName='House For Sale', HouseOwner='Bug_Findsss', HousePassword='-', HouseLock=0, HouseMoney=0, LastEntered=1428658138 WHERE ID=1
[16:29:04] UPDATE houses SET HouseName='House For Sale', HouseOwner='-', HousePassword='-', HouseLock=0, HouseMoney=0, LastEntered=0 WHERE ID=2
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)