Jump to content
MakeWebGames

Recommended Posts

Posted

Hello..

 

I was asked on MSN to update a friend list for someone, I'll think Danny696 was the original author, I've simply changed the look, and added too it

 

Nothing major, Got asked and thought I'd share..

 

You're unable to view this code.

Viewing code within this forum requires registration, you can register here for free.

 

I doubt we need screen shots so I'll give them a miss..

 

 

Enjoy =)

Posted

shrugz friendslist isnt exactly a big table so select * isnt overkill ><

just removed a few slow operators, added an extra secure $_GET function for $_GET['f'] few other nic nacs nothing major

Posted

Fail again....

[...]

You're unable to view this code.

Viewing code within this forum requires registration, you can register here for free.

[...]

You're unable to view this code.

Viewing code within this forum requires registration, you can register here for free.

[...]

You're unable to view this code.

Viewing code within this forum requires registration, you can register here for free.

[...]

You're unable to view this code.

Viewing code within this forum requires registration, you can register here for free.

[...]

And alot more.

Posted

I received this error message: What shall I do?

"QUERY ERROR: You have an error in your SQL syntax; check the

manual that corresponds to your MySQL server version for the right

syntax to use near '%u)' at line 1

Query was SELECT * FROM `friendslist` WHERE (`fl_ADDED`=%u)"

Posted

You lot do realise there is no reason to restrict yourselfs to MCC generic versions right?

The friends/Enemy list i created about 8 month ago on one of my games consisted of 2 user table columns and no extra tables. Simple to do specially if i did it when i was still in the middle of learning a lot to do with exploding variables, I used the same method on my Ignore user script also.

No idea which would be the quicker though, but the code is beautiful :love:

I do love how people stick to Generic MCC methods specially when trying to be unique.

Posted

MTG i recently discovered it's faster to use the operators w/o the need of using sprintf that slows down the query

So I ask, why use sprintf when you can just %%u%%? achieve the same results and it runs faster.

Posted
Yup, 'twas mine, i remeber, noone else did $donator = TRUE;
I'm hoping you don't mind me editing and posting..

 

@Jd; Magic didn't post one? :/

 

@Zero; I'm fully aware off this, However I was asked to edit it, All I did was edit, post...:)

Posted

Well I got bored so I kinda updated it again >.< This time it's the actual code and should be fully secure, but i've been in bed all day so I *might* off missed something. Post if you do receive an error.

 

You're unable to view this code.

Viewing code within this forum requires registration, you can register here for free.

Posted
MTG i recently discovered it's faster to use the operators w/o the need of using sprintf that slows down the query

So I ask, why use sprintf when you can just %%u%%? achieve the same results and it runs faster.

You're missing the point, you're using "sprintf()" operators without sprintf() itself, have you tried it?, I'm pretty sure you're going to receive errors.
Posted

Well I've just tried and as expected received errors, You're adding an extra parameter to "mysql_query" with no function to handle it, I don't understand how that could work :S

Lol, Maybe it does work for you guys but I sure as hell don't see the logic in this.

Posted

slap a ' ' around the %u op

I've done about 15 diff pages not using sprintf( to define %u/%s etc

and they all work 100% :P

The logic being on a test done by someone else

 

with sprintf and %% load time was 1.8

w/o sprint f and just %% load time was .7

w/o either load time was .2

So i went for the middle one >,<

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...