Re: Array Question

From: Date: Thu, 19 Oct 2000 20:28:20 +0000
Subject: Re: Array Question
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-21265@lists.php.net to get a copy of this message
This is what I would do (you may not like this ;o) If you don't have to do this query on the fly (if you do - then put all the data on one server if possible) Actually, this might work for one the fly - have a central table (on one of the two servers) when there is an update on either field do a simple query to a bucket table with this setup InputTime datetime default '0000-00-00 00:00:00' NOT NULL, serverID tinyint(1) NOT NULL, rowID [id type here] NOT NULL, KEY (InputTime), KEY (serverID), KEY (rowID) Now say DB a is ID 1 and DB b is ID 2 - you do a SELECT * FROM bucket ORDER BY InputTime and as you go through you notice that the first on is from 1 so you select rowID from DB a and so on. hope this helps. --Joe On Thu, Oct 19, 2000 at 01:17:32PM -0600, Brian B. wrote: > > > I have two databases, each database in on a different server. I want to do > two queries > one to each database and then pull the results of the two queries into 1 big > array and > then sort the array by datetime field and then display the results. I want > to do this > so I don't have results looking like > > Oct 12 > Oct 11 > Oct 10 > Oct 12 > Oct 11 > Oct 10 > > So that way I can pull all the results I need together and then sort all of > them so both > results from both show as 1 big array. What do I need to do in order to get > this to work? > Any help with code would be greatly appreciated. > > > /'^'\ > ( o o ) > ------------------------------------------oOOO--(_)--OOOo---- > Brian Budnick > ArosNet Systems Administration .oooO > EMail: dreamboy@aros.net ( ) Oooo. > --------------------------------------------\ (----( )----- > \_) ) / > (_/ > > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net > For additional commands, e-mail: php-general-help@lists.php.net > To contact the list administrators, e-mail: php-list-admin@lists.php.net /*****************************\ * Joe Stump * * www.Care2.com * * Office: 650.328.0198 * * Extension: 122 * \*****************************/ http://www.miester.org/Joe/Stump/Joe_Stump_resume.html -----BEGIN GEEK CODE BLOCK----- Version: 3.12 GB/E/IT d- s++:++ a? C++++ UL++$ P+ L+++$ E----! W+++$ N+@ o? K? w---! O-@ M+@ V-! P(++) PE(+) Y+@ PGP+++@ t+@ 5? R-! tv@ b+ DI++@ D(++++) G++@ e+@ h@ r+! z(+++++**)! ------END GEEK CODE BLOCK------

« previous php.general (#21265) next »