I want to query a database and return specific row numbers eg 1, 10 and 25.
Is this possible or will I need to do 3 queries (or 1 query and loop through the rows then only output the ones I need)
using php.
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
If there are specific IDs you require, you could simply use something along the lines of..
…to get these rows back. If however you’re just after arbitrary row numbers, then you’ll have to use multiple queries as far as I’m aware. (Or use PHP, etc. to pluck the required rows back.)
Out of interest what are you trying to achieve?