Jump to content

Pulling Data from the last field of a Table


hossfly007

Recommended Posts

What is the command to view the last result in a table using a DB query?

 

Table Example

TABLE PEOPLE

>ID

>NAME

>POINTS

 

one thing, it cant be ORDER BY id DESC

 

If at all possible it has to be

SELECT * FROM people WHERE name=jon && id=**last id**

 

**last id** = Last id where the name jon was found.

 

$query2 = mysql_query("SELECT * FROM ladiesleague2007 WHERE player='{$data4['player']}' ORDER BY handicap_new DESC LIMIT 1");

 

It's pulling in the wrong information half are right the rest are ASC

 

 

Instead of pulling all the fields and sorting them, i would really like to find out how to find the "last field" that {$data4['player']} is in. It gets alittle more indepth code wise

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.