[PHP-DB] howto merge tables..

2003-08-22 Thread FB
Hi, I have 3 similar tables. I want to merge them. The thing I use is 1) SELECT * 2) Make a while statement 3) INSERT each raw into the other table is there a easier way? FB -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP-DB] howto merge tables..

2003-08-22 Thread Sean Burlington
FB wrote: Hi, I have 3 similar tables. I want to merge them. The thing I use is 1) SELECT * 2) Make a while statement 3) INSERT each raw into the other table is there a easier way? FB if the columsn are identical insert into table1 select * from table2; insert into table1 select * from table3;

Re: [PHP-DB] howto merge tables..

2003-08-22 Thread FB
that was preety good.. merged 3 tables with 2 million raws in 3 minutes... thanks FB Sean Burlington [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] FB wrote: Hi, I have 3 similar tables. I want to merge them. The thing I use is 1) SELECT * 2) Make a while statement 3)

[PHP-DB] Re: PHP Oci8 segmntation fault

2003-08-22 Thread Radovan Radic
Hello Lang Sharpe, It seems this line #undef HAVE_OCI8_SHARED_MODE did the trick. Maybe it can help other ppl too. Thanks a lot, i cant say how much you helped me with this. Radovan Lang Sharpe [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Hi Radovan Here are some suggestions

Re: [PHP-DB] Segmentation fault (11) with PHP ODBC

2003-08-22 Thread Sebastian Haag
Tommy Apel said: Hi I'm having a little problem ondestanding whats going on The problem is that some and only some of my odbc_exec()'s functions while others don't and cause an segmentation fault in apache1/2 My configuration is SuSE 8.1 with Apache2.0.44, PHP4.3.1 --with-iODBC after

Re: [PHP-DB] Segmentation fault (11) with PHP ODBC

2003-08-22 Thread Tommy Apel
Sebastian Haag wrote: Tommy Apel said: Hi I'm having a little problem ondestanding whats going on The problem is that some and only some of my odbc_exec()'s functions while others don't and cause an segmentation fault in apache1/2 My configuration is SuSE 8.1 with Apache2.0.44,

Re: [PHP-DB] Segmentation fault (11) with PHP ODBC

2003-08-22 Thread Tommy Apel
Tommy Apel wrote: Sebastian Haag wrote: Tommy Apel said: Hi I'm having a little problem ondestanding whats going on The problem is that some and only some of my odbc_exec()'s functions while others don't and cause an segmentation fault in apache1/2 My configuration is SuSE 8.1 with

[PHP-DB] MYSQL 4.1 derived tables and PHP

2003-08-22 Thread Jack van Zanen
Hi List, I have installed MYSQL 4.1 with support for derived tables. If I query Mysql with a query that has a subquery in the from clause it works fine. If I now load this query in PHP I get invalid resource error. If I change the select for another select w/o the subquery it works fine (So my

[PHP-DB] Oracle and PHP

2003-08-22 Thread Roger Spears
Hello, I was wondering if there are any PHP people out there that are really into using Oracle databases? I've always used mysql but now I find myself in a situation that requires the use of an Oracle database. I've printed out the information posted by Thies C. Arntzen titled Making

Re: [PHP-DB] MYSQL 4.1 derived tables and PHP

2003-08-22 Thread CPT John W. Holmes
From: Jack van Zanen [EMAIL PROTECTED] I have installed MYSQL 4.1 with support for derived tables. If I query Mysql with a query that has a subquery in the from clause it works fine. If I now load this query in PHP I get invalid resource error. If I change the select for another select w/o the

[PHP-DB] php mssql tcpip

2003-08-22 Thread JD
I used to use named pipes to connect to a remote sql server. My nt department removed anonymous access account and now I have to use tcpip. Since the change the performance of the php quering has decreased. it takes more time to load the page. anything to look at in the sql configs or in the

RE: [PHP-DB] MYSQL 4.1 derived tables and PHP

2003-08-22 Thread Jacob A. van Zanen
Hi THX I added mysql_error() to get the error message. I got the message that the user did not have rights on table /tmp/dbla.bla I figured that I must give some more global read rights to this user (not just DB read rights). After that it worked. THX Jack -Original Message-

[PHP-DB] join across databases - how to select databases?

2003-08-22 Thread Moshe Weitzman
I have looked all over the web but can't find an example *in php* for connecting to a mysql server, selecting database(s), and issueing a query which joins across databases. I already know the SQL required to achieve a multiple database query. My question is about how many calls to

Re: [PHP-DB] join across databases - how to select databases?

2003-08-22 Thread jeffrey_n_Dyke
to my knowledge this is not possible in MySQL. There are only joins at the table level. I've been curious about this in the past myself, so if i'm incorrect, i'm hoping to hear it via this post. hth jeff

Re: [PHP-DB] join across databases - how to select databases?

2003-08-22 Thread CPT John W. Holmes
From: Moshe Weitzman [EMAIL PROTECTED] I have looked all over the web but can't find an example *in php* for connecting to a mysql server, selecting database(s), and issueing a query which joins across databases. I already know the SQL required to achieve a multiple database query. My

Re: [PHP-DB] join across databases - how to select databases?

2003-08-22 Thread CPT John W. Holmes
From: [EMAIL PROTECTED] to my knowledge this is not possible in MySQL. There are only joins at the table level. I've been curious about this in the past myself, so if i'm incorrect, i'm hoping to hear it via this post. You can stop hoping now. It is indeed possible. :) mysql select * from

Re: [PHP-DB] php mssql tcpip

2003-08-22 Thread Colbey
Thoughts... I've used mssql via PHP on linux via tcp/ip 1433 with good success and performance.. Never used named pipes (I'm assuming you have to be an entire ms environment to do that) You might check into timing the process, perhaps the tcp/ip login is taking longer for authentication against

Re: [PHP-DB] join across databases - how to select databases?

2003-08-22 Thread Moshe Weitzman
I assume something like the following would work, regardless of whether/how you've called mysql_select_db() SELECT t1.column FROM database1.table1 t1 JOIN database2.table2 t2 ON t1.id = t2.id If you have something working from the MySQL command line, then it's going to work from mysql_query() with

[PHP-DB] Failure to interact with MySQL in Redhat 9 ?

2003-08-22 Thread David Haines
Hello all. I hope this is the best place to ask this (!) Problem: verified that PHP, MySQL and Apache are all working fine. My first little project, and search.html and results.php is not working in Redhat 9. If I fail to enter a search term, I get the expected error message, but that is just

Re: [PHP-DB] Failure to interact with MySQL in Redhat 9 ?

2003-08-22 Thread jeffrey_n_Dyke
do you get anything helpful if you set error_reporting(E_ALL) and rerun the search. could this be a register_globals issue? can you print_r($_GET) or print_r($_POST) depending on how you have defined the FORM action...and if you can is there anything in those arrays? hth Jeff

Re: [PHP-DB] DISTINCT not working

2003-08-22 Thread Fernando Soto
I havelookingthe MySQL manual for"distinctrow" andI didn't findit, i think you should change for"distinct" $query="CREATE TABLE IF NOT EXISTS temp3TEMP SELECT DISTINCT ROUND($tbl2.Net*.175,2) AS ExpNet175, CONCAT($tbl2.Journal,$tbl2.Description) AS CON175 FROM $tbl2 WHERE

[PHP-DB] WHERE mydatestamp '2003-08-22 13:13:13'

2003-08-22 Thread Matt Babineau
Hey All- I'm trying to find things in my database that are greater then Now(), but the date is stored in a blob (don't ask, I know :-0). Is there a way I can do that comparison to find things that are in the future? Thanks, Matt -- PHP Database Mailing List (http://www.php.net/) To

[PHP-DB] It\'s wierd when I\'ve used forms...

2003-08-22 Thread Joe Walker
I've got a form (for sending mail to a user) and the user input is in an html form using the post method to pass: textarea name=message rows=10 cols=80 wrap=virtual along with some other vars to a php page which sends the message using: mail([EMAIL PROTECTED], $msgSubject, $message, From:

Re: [PHP-DB] It\'s wierd when I\'ve used forms...

2003-08-22 Thread Jacob A. van Zanen
You'll have to look into stripslashes function (of the top of my head) PHP automatically puts slashes around variables Jack On Fri, 2003-08-22 at 23:35, Joe Walker wrote: I've got a form (for sending mail to a user) and the user input is in an html form using the post method to pass:

Re: [PHP-DB] It\'s wierd when I\'ve used forms...

2003-08-22 Thread Jacob A. van Zanen
I mean in front of special characters off course :-) Jack On Fri, 2003-08-22 at 23:40, Jacob A. van Zanen wrote: You'll have to look into stripslashes function (of the top of my head) PHP automatically puts slashes around variables Jack On Fri, 2003-08-22 at 23:35, Joe Walker wrote:

Re: [PHP-DB] WHERE mydatestamp '2003-08-22 13:13:13'

2003-08-22 Thread CPT John W. Holmes
From: Matt Babineau [EMAIL PROTECTED] I'm trying to find things in my database that are greater then Now(), but the date is stored in a blob (don't ask, I know :-0). Is there a way I can do that comparison to find things that are in the future? Option 1: Make a second column of DATETIME and

Re: [PHP-DB] It\'s wierd when I\'ve used forms...

2003-08-22 Thread CPT John W. Holmes
From: Jacob A. van Zanen [EMAIL PROTECTED] You'll have to look into stripslashes function (of the top of my head) PHP automatically puts slashes around variables PHP automatically escapes quotes in incoming form data when magic_quotes_gpc is enabled. If you do not want then, then either

[PHP-DB] Re: Failure to interact with MySQL in Redhat 9 ?

2003-08-22 Thread Roberto Dragva Filho
Hello david, do you set register_globals to ON in /usr/local/lib/php.ini ? try it. Roberto David Haines [EMAIL PROTECTED] escreveu na mensagem news:[EMAIL PROTECTED] Hello all. I hope this is the best place to ask this (!) Problem: verified that PHP, MySQL and Apache are all working fine.