[PHP-DB] Re: about resultset internal pointer

2003-08-28 Thread Peng Cheng
I agree what David says.

but the point is if someone else moved the pointer using mysql_data_seek($i)
and he didn't tell me how much $i is, or I use mysql_data_seek so many times
that I can't remember the sum of the offsets.

I don't think write a tracker is a feasible way, because there are so many
actions can move pointer, mysql_data_seek(), mysql_fetch_row(),
mysql_fetch_array() etc. Tracking all these actions is not possible, and it
is error-prone and needs much much effort.

David Robley [EMAIL PROTECTED]
??:[EMAIL PROTECTED]
 In article [EMAIL PROTECTED], [EMAIL PROTECTED]
 says...
  in php,mysql_seek can move the pointer, but you have no way to know
where
  the pointer locates currently.
  i think some function should be added in the future version, like
  mysql_getPointerPosition($rs) which returns a int as the position in
  resultset. so it's would be easy to implements some pointer moving
functions
  like mysql_movenext(), mysql_moveprev,mysql_movefirst,mysql_movelast
etc.

 It's trivial to do your own tracking of where the pointer is, using
 mysql_num_rows to determine the number of rows in your result set and a
 counter to track your movement, using mysql_data_seek, in the result set.

 The manual shows n example of how to return a set in reverse order, for
 example.

 --
 Quod subigo farinam

 $email =~ s/oz$/au/o;
 A: Because it messes up the order in which people normally read text.
 Q: Why is top-posting such a bad thing?
 A: Top-posting.
 Q: What is the most annoying thing on usenet?

-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP-DB] about resultset internal pointer

2003-08-14 Thread Peng Cheng
in php,mysql_seek can move the pointer, but you have no way to know where
the pointer locates currently.
i think some function should be added in the future version, like
mysql_getPointerPosition($rs) which returns a int as the position in
resultset. so it's would be easy to implements some pointer moving functions
like mysql_movenext(), mysql_moveprev,mysql_movefirst,mysql_movelast etc.




-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP-DB] ODBC Database

2003-08-14 Thread Peng Cheng
i have read an article on IBM's developerWorks website.
its title should be Leverage your Microsoft SQL Server 2000 Skills to Learn
DB2 UDB Version 8

that should help you.

Gerard Samuel [EMAIL PROTECTED] ??:[EMAIL PROTECTED]
 Robert Twitty wrote:

 Unless I am mistaken, but isn't there an ODBC driver available for MySQL
 called MyODBC?
 
 -- bob
 
 I haven't a clue.  Ill look, maybe it will help me create drivers for my
 DB layer, as I already know MySQL.
 Last night I successfully connected to IBM's DB2, but I didnt get far
 past that as I have to figure out,
 how to create tables, figure out how it likes its schemas etc, to really
 give it a work out...




-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php