Re: [PHP] Sort problem

2011-09-14 Thread Igor Escobar
Wow! Thank you! I completely forgot this method! Regards, Igor Escobar *Software Engineer * + http://blog.igorescobar.com + http://www.igorescobar.com + @igorescobar On Wed, Sep 14, 2011 at 12:02 PM, Marc Guay wrote: > > Anyone know a smart way to orde

Re: [PHP] Sort problem

2011-09-14 Thread Marc Guay
> Anyone know a smart way to order file names? Nope, but I know a "natural" way: http://ca.php.net/manual/en/function.natsort.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Sort problem

2011-09-14 Thread Igor Escobar
Hi Folks! Anyone know a smart way to order file names? An example to you guys picture what im saying is: The result of this snippet is: Array ( [0] => Two And Half Man Season 1[1] => Two And Half Man Season 10[2] => Two And Half Man Season 2 [3] => Two And Half Man Season 3

Re: [PHP] sort problem

2002-07-11 Thread Analysis & Solutions
On Thu, Jul 11, 2002 at 11:30:16AM +0200, andy wrote: > > Table 1 user_table > id > points > > Table 2 reports > report_id > user_id > rating > > The goal is to associate every user extra 50 points if he has a top 10 > report. > Top 10 report means the 10 reports with the highest ranking. This

Re: [PHP] sort problem

2002-07-11 Thread Justin French
"If he has a top-ten report"... is that a one-off thing? Or is it a weekly thing? Or is that every time his report get's into the top ten (in which case hovering around 10-11 would be the best bet!!)?? You need to decide WHEN the user is awarded the 50 points for being in the top ten. For exam

Re: [PHP] sort problem

2002-07-11 Thread andy
ok here we go: Table 1 user_table id points Table 2 reports report_id user_id rating The goal is to associate every user extra 50 points if he has a top 10 report. Top 10 report means the 10 reports with the highest ranking. This value is always changing, thats why I did not include it to the o

Re: [PHP] sort problem

2002-07-10 Thread Analysis & Solutions
Please post the relevant table and field names. --Dan -- PHP classes that make web design easier SQL Solution | Layout Solution | Form Solution sqlsolution.info | layoutsolution.info | formsolution.info T H E A N A L Y S I S A N D S O L U T I O N S C

Re: [PHP] sort problem

2002-07-10 Thread Chris Hewitt
database >structure. This approach allows you to do a simple SQL query like this: > >select Users.*, Scores.* from Users, Scores where Users.ID = Scores.UserID >ORDER BY Scores.Points limit 5 > > > > >-Original Message- >From: andy [mailto:[EMAIL PROTECTED]] &

RE: [PHP] sort problem

2002-07-10 Thread Lazor, Ed
cores.Points limit 5 -Original Message- From: andy [mailto:[EMAIL PROTECTED]] Sent: Wednesday, July 10, 2002 10:52 AM To: [EMAIL PROTECTED]; [EMAIL PROTECTED] Subject: [PHP] sort problem Hi guys, I have a problem sorting values comming out of a db. It is not as easy. Here is

[PHP] sort problem

2002-07-10 Thread andy
Hi guys, I have a problem sorting values comming out of a db. It is not as easy. Here is the prob: One table containing user points. Other table containing reports with rankings For each top 10 report (the 10 reports with the most ranking) there are 20 extra points granted Now I would like to g