pte
-
Posts
1 -
Joined
-
Last visited
Never
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.
mysql select
in MySQL Help
Posted
Hi!
I am wondering how I can find out the index of a row in a MySql table given a certain order. For example I have a table containing information of some images on my computer. After
SELECT * FROM Images WHERE Id=\'12\' ORDER BY Date
I get an Image and want to find the next image (next in the Date order). So I would like something as
index = GETINDEX FROM Images WHERE Id=\'12\' ORDER BY Date
nextimage = SELECT * FROM Images WHERE ORDER BY Date LIMIT index+1, index+1
Someone know how to code this into a proper SQL query?
thanks,
pieter