haigotron wrote:
> for example - the first one would only filter id_article
=1, 3, 5 etc...
> while the second would only fitler id_article =2,4,6
> etc...
>
> Therefore, what should I write in the recordset window
under filter?
> id_article = ?
You can't do it in the simple recordset dialog box. Click the
Advanced
button and amend the SQL like this to select odd numbers:
SELECT * FROM myTable
WHERE article_id%2 = 1
To select even numbers:
SELECT * FROM myTable
WHERE article_id%2 = 0
This uses the modulo operator (%) to divide the article_id by
2. Modulo
gives you the remainder of a division, so if the remainder is
1, you
know the number is odd.
You should realize that this works on the records' primary
key. Once you
start deleting records from your database, gaps will appear
in the
sequence. You would need to take a different approach to sort
odd and
even *results*.
--
David Powers
Adobe Community Expert
Author, "Foundation PHP for Dreamweaver 8" (friends of ED)
http://foundationphp.com/