Welcome Guest, Not a member yet? Register   Sign In
active record and sybase limit
#1

[eluser]Unknown[/eluser]
Hello,
Im trying to use Active record with Sybase. It is querying fine, but I would like to use sybase's "top" and "start at" syntaxes to limit results. Example:

Code:
select top 10 start at 1 column_name from table order by column_name asc
I did tried ->limit( 10, 20 ) with no success. the user guide says:"// Produces: LIMIT 20, 10 (in MySQL. Other databases have slightly different syntax)."
So can anybody help me out with the syntax or is it not possible ??
I did try it written out with query() and it DOES work like:
Code:
$query = $this->sybase->query("select top 10 start at 1 column_name from table order by column_name asc);
but I would rather use active record.

Thanks for any help
#2

[eluser]Aken[/eluser]
There's no driver for Sybase in CodeIgniter. You'll have to develop your own driver for it if you want to use active record.
#3

[eluser]Unknown[/eluser]
Thank you. I might just try that (develop my own driver). Any hints? Can I just copy the "odbc" folder for example, along with the driver, forge, result and utility, and just edit them as necessary?




Theme © iAndrew 2016 - Forum software by © MyBB