se7enet purgatorio

Page 1 of 1 1
Topic Options
Rate This Topic
#18483 - 10/14/08 05:18 AM How2Solve "Guild Leave" bug
gamefreak888
Rice Krispies


Registered: 09/06/07
Posts: 215

Offline
I know this is a very simple mod but at least it works.

Open:
guilds.php

Find (in the guildleave() function):

$guild = dorow(doquery("SELECT * FROM {{table}} WHERE id='".$userrow["guild"]."' LIMIT 1", "guilds"));

Replace with:

$guild = dorow(doquery("SELECT * FROM <<guilds>> WHERE id='".$userrow["guild"]."' LIMIT 1"));

That'll do it.

Top
#18484 - 10/14/08 09:12 AM Re: How2Solve "Guild Leave" bug [Re: gamefreak888]
Fayt
Crunchberries
***

Registered: 11/08/05
Posts: 1131
Loc: My Computer, USA

Offline
Nothing changed, all you did was change the table placement
_________________________
MasterFayt - Amara 5 - Manas - Banar

Top
#18485 - 10/14/08 09:48 AM Re: How2Solve "Guild Leave" bug [Re: Fayt]
gamefreak888
Rice Krispies


Registered: 09/06/07
Posts: 215

Offline
Yes and now you don't get an error.
Top
#18486 - 10/14/08 11:10 AM Re: How2Solve "Guild Leave" bug [Re: gamefreak888]
Fayt
Crunchberries
***

Registered: 11/08/05
Posts: 1131
Loc: My Computer, USA

Offline
If DS was coded in proper PHP5 format. It wouldn't have been a problem. But he wanted it different then DK
_________________________
MasterFayt - Amara 5 - Manas - Banar

Top
#18489 - 10/14/08 06:21 PM Re: How2Solve "Guild Leave" bug [Re: Fayt]
AnmanIndustries
Cookie Crisp
*****

Registered: 03/21/05
Posts: 2876
Loc: Planet Stupid, AKA Earth

Offline
Youre an idiot. Its his own parser function.

$array = dorow(doquery("SELECT * FROM <<table>> WHERE id='1' LIMIT 1"));

Is basicaly the same as:

$query = mysql_query("SELECT * FROM static_table_which_isnt_versatile WHERE id='1' LIMIT 1");
$array = mysql_fetch_array($query);

It has NOTHING To do with php5 or whatever, because DOROW and DOQUERY are functions that Jamin has declared in the lib.php file. Tell me, which set of code is easier to type and neater?

On that note, having {{}} around your table WONT work in ANY php version. Because {{}} is the key jamin uses to parse the table into his query functions.

Heres a snipped of the doquery function from a REALLY old version of Dragon Scourge:

$sqlquery = mysql_query(str_replace("{{table}}", $dbsettings["prefix"] . "_" . $table, $query))

Notice how there is {{table}} there, encased in curly brackets? The new code was changed to accept <<>> instead of {{}}. Which is why this never worked after a certain version. Jamin just forgot to change it.
_________________________
If you want me to punch you in the nuts go to:
http://www.AnmanIndustries.com

I'll do it for free too. Enjoy.

Top
#18490 - 10/14/08 08:24 PM Re: How2Solve "Guild Leave" bug [Re: AnmanIndustries]
Fayt
Crunchberries
***

Registered: 11/08/05
Posts: 1131
Loc: My Computer, USA

Offline
Correct PHP style.

mysql_query("SELECT * FROM users WHERE id='1' LIMIT 1", ");
_________________________
MasterFayt - Amara 5 - Manas - Banar

Top
#18491 - 10/15/08 04:36 AM Re: How2Solve "Guild Leave" bug [Re: Fayt]
AnmanIndustries
Cookie Crisp
*****

Registered: 03/21/05
Posts: 2876
Loc: Planet Stupid, AKA Earth

Offline
And then $array = mysql_fetch_array($query);

To make it useful.

Now type out that long and anoying method, 100 times. Oh and dont forget, its not USERS you stupid faggot
Its your PREFIX_USERS.

PREFIX.

I wonder, I wonder why he doesnt use STATIC table references in his query... I wonder....... I WONDER....
_________________________
If you want me to punch you in the nuts go to:
http://www.AnmanIndustries.com

I'll do it for free too. Enjoy.

Top
#18492 - 10/15/08 08:35 AM Re: How2Solve "Guild Leave" bug [Re: AnmanIndustries]
Fayt
Crunchberries
***

Registered: 11/08/05
Posts: 1131
Loc: My Computer, USA

Offline
I am talking about a standard query, but a DK modified query dickhead.
_________________________
MasterFayt - Amara 5 - Manas - Banar

Top
#18496 - 10/15/08 06:00 PM Re: How2Solve "Guild Leave" bug [Re: Fayt]
AnmanIndustries
Cookie Crisp
*****

Registered: 03/21/05
Posts: 2876
Loc: Planet Stupid, AKA Earth

Offline
WHY ARE YOU TALKING ABOUT A STANDARD QUERY!? NO ONE MENTIONED AND/OR CARES!
_________________________
If you want me to punch you in the nuts go to:
http://www.AnmanIndustries.com

I'll do it for free too. Enjoy.

Top
#18498 - 10/15/08 07:25 PM Re: How2Solve "Guild Leave" bug [Re: AnmanIndustries]
Fayt
Crunchberries
***

Registered: 11/08/05
Posts: 1131
Loc: My Computer, USA

Offline
Well I mentioned it and wrote it.
_________________________
MasterFayt - Amara 5 - Manas - Banar

Top
Page 1 of 1 1


Hop to:

se7enet

Barack Obama Logo