Re: [PHP-DB] Help Needed
-- pada 2002-12-26, 14:36:00 [EMAIL PROTECTED] menulis: -- Hi. I juz installed a RedHat 8.0 on my machine. But then I have a problem in configuring Apache 2.0.4 to use PHP 4.20.. It's preety weird.. coz there's nothing shown up in the browser when I run phpinfo(); or even a simple 'helloworld' code. When I view the source by right-clicking.. it shows the php code.. but why it didn't show anything in the browser ??? I've done all the procedures according to manual. but not working at all. check httpd.conf or something similar make sure correct .php parsing salam, adi s. -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: Fwd: [PHP-DB] Set Logout Time for No Activity
-- pada 2002-12-22, 10:56:00 [EMAIL PROTECTED] menulis: -- Hello, I meant sessions. Want to manually log out users that have logged in but haven't performed any activities within the DB say after 3 hours. Is there a default for this? Thanks in advance. :) the idea is, you might create sesssion variable to detect user activity based on user act salam, adi s. -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-DB] Re:[PHP-DB] Array_rand issue...
Dave Carrera [EMAIL PROTECTED] menulis tgl 5/31/02 2:39:45 PM: Hi All I have a fuctioning array of about 20 items. What i would like to do is display 3 items from the array randomly and be able to place the output anywhere on the screen. I have looked at array rand and associated functions at php.net and are currently playing with the code to see if i can make it work but some guidence in this matter would be very much appreciated. Thank you in advance perhaps you can use array_rand(), see manual. here's snip from manual srand ((float) microtime() * 1000); $input = array (Neo, Morpheus, Trinity, Cypher, Tank); $rand_keys = array_rand ($input, 2); print $input[$rand_keys[0]].\n; print $input[$rand_keys[1]].\n; $internet = indomie telor kornet; ___ adi.aroundbali.com -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-DB] database absraction layer
dear all, I'm writing database abstraction layer class (like adoDB but much simpler). What I want to do that it will provide single access function for different type of database. Currently, it will only support mySQL and PostgreSQL.. but I just don't know how to do this with better approach. code snippet.. .. function connect(){ if($this-type == mysql){ $this-conid = mysql_connect($this-host,$this-user,$this-pass); } elseif($this-type == pgsql)){ $this-conid = pg_connect($this-host $this-port $this-db $this-user $this-pass); } else { echo (database type $this-type not supported); } } .. any idea of doing such of function alias/wrapper? any help appreciated thanks ___ adi.aroundbali.com -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-DB] Help : search for a word and its number
Hi, I need a favour from you guys 'n girls : If I have records like this ID Content 1 John have a red book, and a yellow book. He give a yellow book to Tina. 2 Luke doesn't have any book at all, he always borrow it from John. 3 John like swimming. Can I search this records (table) for a word book and also number of book occurences at every record? From table above, the result would be ID Number 13 21 I use Oracle 8.1.7. Thanks, Adi -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-DB] Re:[PHP-DB] multiple inserts
Barry Rumsey [EMAIL PROTECTED] wrote on 4/21/2002 4:58:21 AM: I have the following insert : mysql_connect( localhost, , ); mysql_select_db( ); mysql_query(INSERT INTO music_album VALUES (NULL, '$artist_id' ,'$album' ,NULL ,NULL)); mysql_query(INSERT INTO music_songs VALUES (NULL ,NULL ,NULL ,NULL ,'$songname' ,'$lyrics')); When I run this, the first insert works alright but the second insert does nothing. What am I doing wrong ? How do I do a mysql_insert_id()? if you'd think that your queries is correct, try use some sort of different identifier for each query. and also look at mysql_error, as this very useful to determine what's wrong. $query1 = mysql_query(INSERT INTO music_album VALUES (NULL, '$artist_id' ,'$album' ,NULL ,NULL)); if(!$query1) {echo error query 1 mysql_error(); } $query2 = mysql_query(INSERT INTO music_songs VALUES (NULL ,NULL ,NULL ,NULL ,'$songname' ,'$lyrics')); if(!$query2) {echo error query 2 mysql_error(); } CMIIW _ adi.baliroomfinder.net -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-DB] Re:[PHP-DB] Connection error
Ciprian Trofin [EMAIL PROTECTED] wrote on 4/19/2002 5:29:00 PM: Bisexuality doubles the chance of getting a date. Hi All! In order to make my job easy, a choose the following approach: settings.php ? $dbserver = 'server'; $dbname = 'name'; $dbpass = 'password'; ? main_file.php ? include settings.php; @mysql_connect($dbserver,$dbname,$dbpass) or die (Error); ? On the test machine (Windows 98, PHP Triad 221 - PHP 4.1.0) it works; when I put the project online, it doesn't (the Error message shows up). If I don't use this approach and, in main_file.php, I use the line: @mysql_connect('server','name','pass') or die (Error) the sistem works. What's the problem ? try double quote instead single quote. $dbserver = server; _ adi.baliroomfinder.net -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-DB] Magic quotes sybase
Hi, can I enabled or disabled magic_quotes_sybase at runtime? Or is there any workaround so character (') doesn't treated as (''), because of magic_quotes_sybase ? Thanks, -- Adi Wibowo -- http://dewey.petra.ac.id * Work matter: [EMAIL PROTECTED] * Private matter : [EMAIL PROTECTED] -- -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DB] PHP vs. 2 database softwares
On Mon, 1 Oct 2001, Scott Fletcher wrote: Date: Mon, 1 Oct 2001 12:11:12 -0400 From: Scott Fletcher [EMAIL PROTECTED] To: [EMAIL PROTECTED] Subject: [PHP-DB] PHP vs. 2 database softwares Hi! I found that PHP can be compiled and work with only one database software. You won't be able to have PHP to work with 2 seperate database softwares. (You can compile it but it will work only with one databse software, not both, no matter what). I checked the php ./configure file and found that it is not design to include 2 seperate databases when you want it to. I used ./configure in order to access Oracle and MySQL and it worked. Adi Wibowo -- http://dewey.petra.ac.id * Work matter: [EMAIL PROTECTED] * Private matter : [EMAIL PROTECTED] -- -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: Fwd: Re: [PHP-DB] OCIFetch performance problem with more rows
On Wed, 23 May 2001, Thies C. Arntzen wrote: I have performance problem with OCIFetch (and OCIFetchInto, too) when query return more rows.Same query from sqlplus is more fastest (more rows is worse then less rows) Indexes aren't problem.I use php and sqlplus with same tables. Sqlplus is faster. Of course SQLPlus execution *seems* tob faster. Once again ... seems ... This is caused by different optimation approach executed by Oracle. There are two kind of optimation : - Rule based optimation : faster first row - Cost based optimation : faster all row Rule Based Optimation will give you faster FIRST ROW display. First row will be displayed as fast as it can eventhough all necesarry process/steps are not done yet. This is good for access via tools like SQLPlus, where operator doesn't want to wait for a long time just to see the first row. But this doesn't suit for some kind of operation like OLTP (Online Transaction Processing like accessing oracle using PHP. This is where cost based optimation take action. CBO gives best througput using the least amount of resourcess necessary to process all rows accessed by sql statement. It means faster time for returning ALL rows compared with RBO. So you see that SQLPlus give you faster result .. BUT .. only for the first row. So it seems to be faster. But it doesn't. Important : Eventhough oracle will use CBO as a default, but it need some conditions to be met. Oracle Data dictionary need to have statistics about all schema object on your database. We should collect statistics by using DBMS_STATS package, or ANALIZYE statement. Otherwise oracle will use RBO which is slower to return data to our PHP. It will be better if we use document from oracle site : Oracle 8i : Designing and Tuning for Performance. Adi Wibowo --- * Work matter: [EMAIL PROTECTED] * Private matter : [EMAIL PROTECTED] -- -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP-DB] How to migrate Oracle 4.01 database?
On Fri, 9 Mar 2001, [gb2312] ³Âΰƽ wrote: Hi, I have a database based on Oracle 4.01. Now I want to migrate it to Oracle 8i. Does anyone have reference to me? Hi, I (we) have a database based on Oracle 6. And we want to migrate to Oracle 8i. After some consultations with Oracle Support in my country they suggest that we should upgrade to Oracle 7 and then Oracle 8. Why? There is no tool to upgrade a database from version below 7 and differences between the two (6 vs 8) is so big, so there is no safe way than clean install Oracle 8i server onto another server, create a database with exact scheme, and retrieve every row of data from an old database and save it (insert) into a new database. It work for us now. And we glad seeing the result is so good. Adi Wibowo --- * Work matter: [EMAIL PROTECTED] * Private matter : [EMAIL PROTECTED] -- -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]