Advertisement

07.18.2008 at 12:34AM PDT, ID: 23576029
[x]
Attachment Details

How can I select the highest number from a list of fields?

Asked by phpretard in Web Development

$result = mysql_query("SELECT * FROM 4Sale ");

while($row = mysql_fetch_array($result))
  {
  $highbid=$row['bid']; // THERE ARE SEVERAL DIFFERENT ENTRIES FOR BID
  }


// I am trying to validate with this

      if($bid < $highBid) {
      ECHO"BID HIGHER";
      }

of course the form field is name=bid AND THE db FIELD NAME IS BID.      Start Free Trial
[+][-]07.18.2008 at 12:59AM PDT, ID: 22033619

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]07.18.2008 at 01:26AM PDT, ID: 22033749

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]07.18.2008 at 01:46AM PDT, ID: 22033841

View this solution now by starting your 7-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

 

About this solution

Zone: Web Development
Sign Up Now!
Solution Provided By: orcic
Participating Experts: 1
Solution Grade: A
 
 
[+][-]07.18.2008 at 01:50AM PDT, ID: 22033855

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
 
Loading Advertisement...
20080716-EE-VQP-32 / EE_QW_2_20070628