Jump to content

Simple DB Query Needed


ecopetition

Recommended Posts

Hi,

 

I'm looking for a query that will let me check different rows of a database to see which one has the highest time (a time_posted column is present). I also need to set conditions.

 

Something like:

$sql = SELECT *

        FROM tablename

        WHERE post_number = $post_number

        AND time_posted = {{{highest number}}}

$result = $resultvar[]

 

What would I set {{{highest number}}} to?

Link to comment
https://forums.phpfreaks.com/topic/118671-simple-db-query-needed/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.