Click to See Complete Forum and Search --> : How do I... (recordset question)


Doc Thirst
12-12-2006, 03:03 PM
OK, I am trying to emulate the recordset functionality of VB.

I have a table with several records. I need to search the records and return the results one record at a time, ideally with previous/next buttons. Think photo gallery.

I'm currently thinking the original search will build an array and I can then "foreach" navigate through the array.

Is there a better way to do this?

chazzy
12-12-2006, 03:28 PM
what dbms are you using? what apis?

Doc Thirst
12-12-2006, 03:35 PM
what dbms are you using? what apis?

Holy cow, acronyms!

Nothing fancy, PhP on Win 2003 iis, whacking on a MS SQL 2005 build.

chazzy
12-12-2006, 05:01 PM
you still didnt' answer the APIs.
are you using the mssql_* functions or the odbc_* functions?

russell
12-12-2006, 08:56 PM
better to do recordset paging

if u are using mssql_* see PHP.net MSSQL Functions (http://us2.php.net/mssql). That oughtta get u going in the right direction. post back if u have specific issues.

Doc Thirst
12-13-2006, 08:30 AM
You are correct in your assumption, I'm using mssql not odbc. I'll check out the function list again, thanks.

Doc Thirst
12-13-2006, 09:04 AM
I'm not sure why you referred me to the function list, I don't know what might help me there except the call into an array. I think I should have phrased my problem a bit differently. Thanks anyway, I'll let you know how I work it out.