[MYSQL]Mysql_Get_field returns empty even though there is something there
#1

Okay so i have a weird problem. As i try to make my car loading system my server returns 0 rows back even when there is. Code:
pawn Код:
format(str, sizeof(str), "SELECT `HouseID` FROM `Houses` WHERE `Houseowner`='%s'", name);
    mysql_real_escape_string(str, string1);
    mysql_query(string1);
    mysql_store_result();
    mysql_get_field("HouseID", string1); //Gets the first field of the row returned (HouseID)
    mysql_free_result();
The mysql log outputs this:
Код:
[13:10:08] CMySQLHandler::Query(SELECT `HouseID` FROM `Houses` WHERE `Houseowner`='Thimo') - Successfully executed.

[13:10:08] >> mysql_store_result( Connection handle: 1 )

[13:10:08] CMySQLHandler::StoreResult() - Result was stored.

[13:10:08] >> mysql_fetch_field_row( Connection handle: 1 )

[13:10:08] CMySQLHandler::FetchField(HouseID) - You cannot call this function now. (Reason: Fields/Rows are empty.)

[13:10:08] >> mysql_free_result( Connection handle: 1 )

[13:10:08] CMySQLHandler::FreeResult() - Result was successfully free'd.
Proof of that there is something in there:
Uploaded with ImageShack.us

Now what could be wrong?
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)