Upgrading mysql version
#4

Quote:
Originally Posted by Abagail
Посмотреть сообщение
You should use threaded queries, however they're handled differently. They use callbacks, however you can also save cache for later use outside of it with cache_save, cache_set_active, cache_is_valid, etc.

pawn Код:
FUNKCIJA:OnLoadBizzFurnitures( )
    return mysql_tquery(gSQLConnection, "SELECT * FROM bfurniture", "OnLoadBizFurniture", "");

forward OnLoadBizFurniture();
public OnLoadBizFurniture()
{
    new
        // define everything

    if(cache_num_rows())
    {
        for(new i; i <= cache_num_rows(); i++)
        {
            // for strings
            cache_get_field_content(i, "Id", content);

            // for integers
            BizzFurniture[ id ][ fObjectId ] = cache_get_field_content_int(i, "ObjectId");
        }
    }

    printf("... print");
    return true;
}
Код:
rezultatas = mysql_query(Handle, "SELECT * FROM `bfurniture`");
        rows = cache_num_rows();

	if ( rows )
 	{
		while(cache_get_row_count(Handle))
		{
This wouldnt work?

Maybe you could explain why did you create this for(new i; i <= cache_num_rows(); i++)?
Reply


Messages In This Thread
Upgrading mysql version - by Bailews - 10.06.2017, 14:09
Re: Upgrading mysql version - by Bailews - 10.06.2017, 15:19
Re: Upgrading mysql version - by Abagail - 10.06.2017, 16:01
Re: Upgrading mysql version - by Bailews - 10.06.2017, 16:23
Re: Upgrading mysql version - by Abagail - 10.06.2017, 16:32

Forum Jump:


Users browsing this thread: 1 Guest(s)