Forum Moderators: coopster

Message Too Old, No Replies

Instead of .MIN function

I need a "last" or "most recent" function

         

dauction

3:55 pm on Jun 19, 2008 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



I have something that goes like this ..

$Description.='Cheapest Price: $'.$qryState['MIN(`price_`)'];

That I want to change to something like ;

$Description.='Last Reported Price: $'.$qryState['RECENT(`price_`)'];

I have scanned a list of 700 Functions but not making much headway .. just going to pull the last reported price instead of the Cheapest

dauction

4:13 pm on Jun 19, 2008 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Umm ..Looks like I need to also use a Date Function as .MIN is now simply choosing the Min in 1 Field ..if I want the Last reported price I also need to incorporate the Date Field ? IS that the right line of thought ?

coopster

4:17 pm on Jun 20, 2008 (gmt 0)

WebmasterWorld Administrator 10+ Year Member



I would say yes, but we haven't seen the table(s) definition. If you need the least/lowest value, MIN is your function. If you need the last one entered, you can either use a date/time field, a MAX identifier field (such as AUTO_INCREMENT in MySQL), or you might even be able to grab the last row in your database table using another mechanism.

dauction

1:57 am on Jun 21, 2008 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Thanks Coopster

I believe the Date since I want to display not only the last reported price but the date as well..

I'll just hire it out as I usually do with aspects of development beyond my skill set..

I just like to at least have a rough idea of what each part of the code/scripts are doing so I can fix minor "issues"

coopster

2:28 pm on Jun 21, 2008 (gmt 0)

WebmasterWorld Administrator 10+ Year Member



Then make sure your developer leaves plenty of comments in the code for you!