Re: [PHP] randomly select a table, better way?

2003-09-02 Thread Daniel Bray
On Mon, 01 Sep 2003 22:49:55 +, Curt Zirzow wrote: Instead of looping through all the tables and building an array you can do something like: $n = mysql_num_rows($result); $seek = mt_rand(0, $n-1); mysql_data_seek($result, $seek); Curt So then the total code would be: ?

[PHP] randomly select a table, better way?

2003-09-01 Thread Daniel Bray
Ok, I have looked through the archives on both MySQL and PHP's lists, but I have not seen this asked or mentioned. Weird, I thought this would be a common thing. Is there a better way to randomly select a table from a database, than what I have come up with: ?php srand ((float)

[PHP] ldap_list + Novell eDirectory

2003-08-14 Thread Daniel Bray
I am trying to list out some printers in our Novell tree. The server that I am hitting is a Netware 6 server, running eDirectory 8. Here is the code I am using (simplified): begin code-- $printer_dn = ou=$facility_selected, $basedn; $printer_list =