SA-MP Forums

Go Back   SA-MP Forums > SA-MP Scripting and Plugins > Plugin Development

Reply
 
Thread Tools Display Modes
Old 08/07/2010, 06:32 PM   #1161
michael2572
Big Clucker
 
Join Date: Jan 2007
Posts: 49
Reputation: 20
Default Re: [REL] MySQL Plugin R4 (21/04/2010)

So mysql_retrive_row does not fetch data to pawn. So it's a little useless, no?
__________________
super fun derby since 2009 - cnbderby.net:7777
michael2572 is offline   Reply With Quote
Old 08/07/2010, 06:40 PM   #1162
Misiek
Big Clucker
 
Join Date: May 2006
Posts: 111
Reputation: 16
Default Re: [REL] MySQL Plugin R4 (21/04/2010)

It's not, it fetches the next row internally allowing you to use mysql_fetch_field.
Misiek is offline   Reply With Quote
Old 08/07/2010, 07:36 PM   #1163
Sergei
High-roller
 
Sergei's Avatar
 
Join Date: Mar 2008
Location: Slovenia
Posts: 2,871
Reputation: 230
Default Re: [REL] MySQL Plugin R4 (21/04/2010)

It's basically mysql_next_row, so it moves you to the next row. That way you can use mysql_fetch_field_row (mysql_get_field) without extracting result in pawn using mysql_fetch_row_format when you don't need it.
Sergei is offline   Reply With Quote
Old 08/07/2010, 11:17 PM   #1164
michael2572
Big Clucker
 
Join Date: Jan 2007
Posts: 49
Reputation: 20
Default Re: [REL] MySQL Plugin R4 (21/04/2010)

Okay. That makes a lot of sense, actually. This plugin rrrrreally needs a documentation...maybe I'll write one.
__________________
super fun derby since 2009 - cnbderby.net:7777
michael2572 is offline   Reply With Quote
Old 09/07/2010, 08:19 PM   #1165
whitedragon
Gangsta
 
Join Date: Sep 2009
Posts: 516
Reputation: 2
Default Re: [REL] MySQL Plugin R4 (21/04/2010)

How make read and right users info from mysql?
whitedragon is offline   Reply With Quote
Old 09/07/2010, 09:32 PM   #1166
Sergei
High-roller
 
Sergei's Avatar
 
Join Date: Mar 2008
Location: Slovenia
Posts: 2,871
Reputation: 230
Default Re: [REL] MySQL Plugin R4 (21/04/2010)

Learn SQL language.
Sergei is offline   Reply With Quote
Old 10/07/2010, 06:34 AM   #1167
mororo
Little Clucker
 
Join Date: Feb 2008
Posts: 8
Reputation: 0
Flowers Re: [REL] MySQL Plugin R4 (21/04/2010)

Hello,
I have a question if the R4 version is available for Debian.
And I wonder if I could use the R4 a_mysql older plugin R2
Alternatively, if so I would ask to revive the link.

Resolving the problem and then sends the command to print individual row in their own changes

Code:
new field[256],str[256]
mysql_fetch_field_row(field, "NICK");
format(str,256,"Test %s, %d",field,field);
SendClientMessage(playerid,GREY,str);
This example does not work and can not use mysql_retrieve_row () any suggestions?
Thank you very much in advance and sorry for my English but (****** Translate)

Mororo
mororo is offline   Reply With Quote
Old 10/07/2010, 08:30 AM   #1168
Sergei
High-roller
 
Sergei's Avatar
 
Join Date: Mar 2008
Location: Slovenia
Posts: 2,871
Reputation: 230
Default Re: [REL] MySQL Plugin R4 (21/04/2010)

Did you save result? Did you fetched the row?

Code:
format(str,256,"Test %s, %d",field,field);
Both are strings, so %s.
Sergei is offline   Reply With Quote
Old 10/07/2010, 10:17 AM   #1169
mororo
Little Clucker
 
Join Date: Feb 2008
Posts: 8
Reputation: 0
Default Re: [REL] MySQL Plugin R4 (21/04/2010)

I do not understand what you mean my entire code: Thank you for your advice

Code:
dcmd_loadcar(playerid, params[]){
  #pragma unused params
	if(mysql_stav()){
		new query[256];
		format(query,sizeof(query),"SELECT * FROM `savecar` WHERE NICK='%s' LIMIT 1",Jmeno(playerid));
    mysql_reconnect();
    mysql_query(query);
    mysql_store_result();
		if(mysql_ping()>0){
//----------------------------------------------------------------------------------------
			new field[256],str[256]
			mysql_fetch_field_row(field, "Nick");
                        ... 17 row
			format(str,256,"Test %s, %d",field,field); // %d I just gave the test because of desperation to find out why it does not
//----------------------------------------------------------------------------------------
		}else{
      mysql_free_result();
    	SendClientMessage(playerid,RED,"Chyba : Nemáte v DB auto");
		}
	}else{
    SendClientMessage(playerid,RED,"Chyba : Server neni spuštěn");
	}
	return 1;
}
mororo is offline   Reply With Quote
Old 10/07/2010, 10:57 AM   #1170
Sergei
High-roller
 
Sergei's Avatar
 
Join Date: Mar 2008
Location: Slovenia
Posts: 2,871
Reputation: 230
Default Re: [REL] MySQL Plugin R4 (21/04/2010)

Instead of
Code:
if(mysql_ping()>0)
use
Code:
if(mysql_retrieve_row())
And mysql_free_result() isn0t optional, so post it out of ifs
Sergei is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
****** Project: Glass int3s0 Everything and Nothing 99 26/02/2013 04:22 PM
MySQL Plugin R5 plugin problem dud Scripting Help 12 05/12/2011 06:28 PM
Strikens Mysql vs BlueG's Mysql plugin PrawkC Scripting Help 4 30/09/2011 10:30 AM
[help][plugin] Can't load mysql plugin mariomako Help Archive 8 16/07/2011 02:37 PM
mysql plugin. loading plugin failed ikkentim Help Archive 2 10/02/2011 02:32 PM


All times are GMT. The time now is 08:49 AM.


Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.