[program-l] Re: php logic

  • From: "Jacob Kruger" <jacob@xxxxxxxxxxxxx>
  • To: <program-l@xxxxxxxxxxxxx>
  • Date: Sun, 15 Jun 2014 13:40:07 +0200

Well, then you might do best to pull them out of the database, load them into a PHP array, where you can sort them, and then use the lowest two values from there to generate an SQL statement to clear the values from the record..?


Stay well

Jacob Kruger
Blind Biker
Skype: BlindZA
"Roger Wilco wants to welcome you...to the space janitor's closet..."

----- Original Message ----- From: "Bryan Schulz" <b.schulz@xxxxxxxxxxxxx>
To: <program-l@xxxxxxxxxxxxx>
Sent: Saturday, 14 June, 2014 10:28 PM
Subject: [program-l] Re: php logic


hi,

close, they are a series of scores all in the same record for a player
Bryan Schulz


----- Original Message ----- From: "Jacob Kruger" <jacob@xxxxxxxxxxxxx>
To: <program-l@xxxxxxxxxxxxx>
Sent: Saturday, June 14, 2014 6:13 AM
Subject: [program-l] Re: php logic


If those are numbers in a specific field - field1 - in a mysql table, then something like the following SQL statement might select/delete the relevant two rows:

delete from tbl_one where id in (select id from tbl_one order by i_field1 desc limit 2);

And, haven't tested that, but, think it's roundabout right - might be minor syntax issues.

Stay well

Jacob Kruger
Blind Biker
Skype: BlindZA
"Roger Wilco wants to welcome you...to the space janitor's closet..."

----- Original Message ----- From: "Bryan Schulz" <b.schulz@xxxxxxxxxxxxx>
To: <program-l@xxxxxxxxxxxxx>
Sent: Saturday, 14 June, 2014 7:56 AM
Subject: [program-l] php logic


hi,

could someone provide pseudo thoughts of how to throw away two values from a mysql table using php?

a sample would be these numbers:
542, 567, 452, 624, 584, 472, 645.

how would you throw away the low values of 452 and 472?

thanks,
Bryan Schulz

** To leave the list, click on the immediately-following link:-
** [mailto:program-l-request@xxxxxxxxxxxxx?subject=unsubscribe]
** If this link doesn't work then send a message to:
** program-l-request@xxxxxxxxxxxxx
** and in the Subject line type
** unsubscribe
** For other list commands such as vacation mode, click on the
** immediately-following link:-
** [mailto:program-l-request@xxxxxxxxxxxxx?subject=faq]
** or send a message, to
** program-l-request@xxxxxxxxxxxxx with the Subject:- faq


** To leave the list, click on the immediately-following link:-
** [mailto:program-l-request@xxxxxxxxxxxxx?subject=unsubscribe]
** If this link doesn't work then send a message to:
** program-l-request@xxxxxxxxxxxxx
** and in the Subject line type
** unsubscribe
** For other list commands such as vacation mode, click on the
** immediately-following link:-
** [mailto:program-l-request@xxxxxxxxxxxxx?subject=faq]
** or send a message, to
** program-l-request@xxxxxxxxxxxxx with the Subject:- faq

** To leave the list, click on the immediately-following link:-
** [mailto:program-l-request@xxxxxxxxxxxxx?subject=unsubscribe]
** If this link doesn't work then send a message to:
** program-l-request@xxxxxxxxxxxxx
** and in the Subject line type
** unsubscribe
** For other list commands such as vacation mode, click on the
** immediately-following link:-
** [mailto:program-l-request@xxxxxxxxxxxxx?subject=faq]
** or send a message, to
** program-l-request@xxxxxxxxxxxxx with the Subject:- faq


** To leave the list, click on the immediately-following link:-
** [mailto:program-l-request@xxxxxxxxxxxxx?subject=unsubscribe]
** If this link doesn't work then send a message to:
** program-l-request@xxxxxxxxxxxxx
** and in the Subject line type
** unsubscribe
** For other list commands such as vacation mode, click on the
** immediately-following link:-
** [mailto:program-l-request@xxxxxxxxxxxxx?subject=faq]
** or send a message, to
** program-l-request@xxxxxxxxxxxxx with the Subject:- faq

Other related posts: