[PHP-DB] How to convert Date to UnixTimeStamp

2002-05-31 Thread Jack
Dear all I had a table which store the date input by user, eg : 2001-12-31 How i can convert it back to Unix time Stamp? I got to do so for comparsion of date! Thx a lot! Jack -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP-DB] Array_rand issue...

2002-05-31 Thread Dave Carrera
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

RE: [PHP-DB] How to convert Date to UnixTimeStamp

2002-05-31 Thread Niklas Lampén
In mySQL query use UNIX_TIMESTAMP('2001-12-31'). Niklas -Original Message- From: Jack [mailto:[EMAIL PROTECTED]] Sent: 31. toukokuuta 2002 9:31 To: [EMAIL PROTECTED] Subject: [PHP-DB] How to convert Date to UnixTimeStamp Dear all I had a table which store the date input by user, eg

Re: [PHP-DB] Oracle9i+php4.2.0

2002-05-31 Thread Hubert ADGIE
Hello, I don't know but I may experiment this. Why do you query that ? You tried and encounter problems or That's just to know ? At 24/05/2002 10:20, Ing.Peter Misovic wrote: hallo I'd like to know if PHP 4.2.0 supprts Oracle9i. -- Hubert ADGIE [EMAIL PROTECTED] Tel : +33 5 53 88 00 76 Fax :

[PHP-DB] newbie:What database can I use with php4 ?

2002-05-31 Thread Craig Williams
I'd like to use a file based database and something that is compatable with windows and linux. I don't want to use mysql on my main sites because many hosting companies don't support it. thanks Craig -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit:

[PHP-DB] php is connecting to the wrong mysql server

2002-05-31 Thread andy
Hi there, I am just trying to configure my root server. The provider has preinstalled mysql on suse72. So I did try to get rid of this installation with yast, but this did not work out. After compiling php,apache and mysql, PHP is still trying to connect to the old server. The new server is

[PHP-DB] new pair of eyes

2002-05-31 Thread Jas
I think I am missing something: $db_name = database; $table_name = auth_users; $sql = DELETE user_id, f_name, l_name, email_addy, un, pw FROM $table_name WHERE user_id = \$user_id\, $dbh; $result = mysql_query($sql, $dbh) or die (Could not execute query. Please try again later.); Its not

Re: [PHP-DB] new pair of eyes

2002-05-31 Thread Jason Wong
On Saturday 01 June 2002 00:30, Jas wrote: I think I am missing something: $db_name = database; $table_name = auth_users; $sql = DELETE user_id, f_name, l_name, email_addy, un, pw FROM $table_name WHERE user_id = \$user_id\, $dbh; The MySQL syntax for DELETE is: DELETE FROM table

[PHP-DB] Re: new pair of eyes

2002-05-31 Thread Jas
Sorry, got it working, just needed to remove user_id, f_name etc. and it works fine. Jas [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... I think I am missing something: $db_name = database; $table_name = auth_users; $sql = DELETE user_id, f_name, l_name,

Re: [PHP-DB] new pair of eyes

2002-05-31 Thread Juan Pablo Aqueveque
If I want to delete a record, I simply put this (the rest is not necessary): $sql=DELETE from $tableName where ROWID=$rowid; OK, now the complete routine would be: $deleteStmt=DELETE from $tableName where ROWID=$rowid ; //Connect to the DB if (!($link=mysql_pconnect($hostName, $userName,

[PHP-DB] Re: Multi-table query slower than using array?

2002-05-31 Thread Frank Flynn
It's hard to say for certain without knowing much more about your DB (the schema, number of rows, indexes and such). But here are some general tips I can think of: -try the multi table query in your admin tool (to avoid any overhead PHP and the web server may cause). Is it 10 seconds here or

[PHP-DB] Mutiple inserts with one query?

2002-05-31 Thread Leif K-Brooks
Is there a way to insert multiple identical rows in one mysql query? I'm using a looped query right now, which uses more server load than it should... Thanks! -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP-DB] Mutiple inserts with one query?

2002-05-31 Thread Kevin Stone
To be honest I have no idea (just learning SQL myself) but the MySQL manual does offer at least a few tips to help opitmize your insert statements in looped scenarios... http://www.mysql.com/doc/I/n/Insert_speed.html -Kevin - Original Message - From: Leif K-Brooks [EMAIL PROTECTED] To:

Re: [PHP-DB] Mutiple inserts with one query?

2002-05-31 Thread Patrick Emond
Sure, MySQL lets you do this: INSERT INTO your_table VALUES ('text', 'more text', 4, 12), ('text', 'more text', 4, 12), ('text', 'more text', 4, 12), ('text', 'more text', 4, 12); This single insert query adds four rows to the table 'your_table'. Also, they inserted rows don't have to be

[PHP-DB] Re: newbie:What database can I use with php4 ?

2002-05-31 Thread Frank Flynn
Craig, You can use just about any modern DBMS. If you're concerned about support why not ask your hosting company up front - I've never had any problems finding support for MySQL (although my Oracle, MS and IBM sales reps have all claimed I would). The cost is stunning - Oracle list price is

[PHP-DB] Re:[PHP-DB] Array_rand issue...

2002-05-31 Thread adi
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-DB] Re: Mutiple inserts with one query?

2002-05-31 Thread Frank Flynn
Yes there is, it's kind of a hack... If you insert using values you can only insert 1 row: INSERT foo (col1, col2, col3) VALUES(Moe, Larry, Curley) But if you use a select statement it will insert as many rows as the select returns: INSERT foo (col1, col2, col3) SELECT col1, col2, col3

[PHP-DB] Pulldown selection speeds

2002-05-31 Thread Chris Payne
Hi there Everyone, I’m having an issue with pulldown selection speeds, is there a way to grab all the data from the DB and store it in jscript or something which isn’t serverside? I mean, say it grabs everything, and in the first menu they select England, it then populates the second menu with

Re: [PHP-DB] new pair of eyes

2002-05-31 Thread Adam Royle
Hey there, I was just looking at your code, and I also look at other's code, and I think people are making life difficult for themselves. Sure a lot of people on this list are beginners, but thats more te reason to simplify code... One thing you should always do, is write functions... I have