Jump to content

get -1 of existing value?


godsent

Recommended Posts

I am trying to make that code would select id value less then current.

For example if account have values:

 

5

7

9 (current)

12

 

I want this to select value "7". But now it always select the first value "5". I understand why it selects first, but i don't know how to make it  select one below.

 

$query  = "SELECT * FROM playlist WHERE account = '$user' AND id < '$current' LIMIT 1"; 

 

Please help if you know what i mean, sorry for English.

Link to comment
https://forums.phpfreaks.com/topic/183284-get-1-of-existing-value/
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.