Hi everyone. I need a little help here. I'm createing a database abstraction class for version 2.0 of my forum software (phpBB, <!-- m --><a class="postlink" href="http://www.phpbb.com">http://www.phpbb.com</a><!-- m -->). So far classes for MySQL, MS-SQL, ODBC and Postgres have been created and I'm currently working on the Oracle8 class. Now, I've run into some issues..
The system was origanly designed to work with MySQL so alot of our SQL is like this:
SELECT * FROM users LIMIT 5, 20;
As we all know LIMIT isn't supported in Oracle so how would I do that with Oracle? I can use WHERE ROWNUM < 20 to only get 20 results but how do I have it start counting at the 5th row? (I've tried WHERE ROWID >= 5..dosan't work).
Also, we use AUTO_INCREMENT fields in our MySQL schema...what is the equivalent in Oracle? (or will I have to use a sequance and a trigger to achive the same effect?)
Lastly, There is no corrasponding OCI function for mysql_insert_id() so does anyone have an solution to get the inserted ID without having to resort to a SELECT?
Thanks very much in advance for any advice you can give
The system was origanly designed to work with MySQL so alot of our SQL is like this:
SELECT * FROM users LIMIT 5, 20;
As we all know LIMIT isn't supported in Oracle so how would I do that with Oracle? I can use WHERE ROWNUM < 20 to only get 20 results but how do I have it start counting at the 5th row? (I've tried WHERE ROWID >= 5..dosan't work).
Also, we use AUTO_INCREMENT fields in our MySQL schema...what is the equivalent in Oracle? (or will I have to use a sequance and a trigger to achive the same effect?)
Lastly, There is no corrasponding OCI function for mysql_insert_id() so does anyone have an solution to get the inserted ID without having to resort to a SELECT?
Thanks very much in advance for any advice you can give