RE: [PHP-DB] group by day (unix timestamp provided)

2002-10-25 Thread joakim . andersson
How can I get mySQL to group stuff by the day? my date coloumn is a UNIX timestamp. SELECT whatever FROM my_table GROUP BY FROM_UNIXTIME(timestamp_col, '%Y-%m-%d') Regards Joakim -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

RE: [PHP-DB] From address in mail() header not working - ideas?

2002-10-25 Thread joakim . andersson
Hi Guys, I did try that but I will try it again. Also, I have echo'd the data and it does appear as I expect. Any other thoughts while I try this? Don't know if this has anything to do with your problem, but $headers = Return-Path: $support_email\r\n; should be $headers .=

[PHP-DB] Millions of records in MySQL

2002-10-25 Thread Steve Vernon
Hiya, I remember ages ago that mysql does not properly handle upwards of 10 million records in a table? Any details would be great! Thanks, Steve -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP-DB] Millions of records in MySQL

2002-10-25 Thread Jason Wong
On Friday 25 October 2002 16:10, Steve Vernon wrote: Hiya, I remember ages ago that mysql does not properly handle upwards of 10 million records in a table? Any details would be great! Try it, or ask on the mysql list? -- Jason Wong - Gremlins Associates - www.gremlins.com.hk Open

Re: [PHP-DB] Millions of records in MySQL

2002-10-25 Thread 1LT John W. Holmes
I remember ages ago that mysql does not properly handle upwards of 10 million records in a table? What's this got to do with PHP? And yes, MySQL will handle it, depending on what you're doing with the data. There are always alternatives, though. ---John Holmes... -- PHP Database

Re: [PHP-DB] Fw: array transfer via form.

2002-10-25 Thread Garry Climacosa
yes i did, and it creates a the access.temp2.txt file but it only contains the last array... - Original Message - From: Jason Wong [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Friday, October 25, 2002 6:40 PM Subject: Re: [PHP-DB] Fw: array transfer via form. On Friday 25 October 2002

Re: [PHP-DB] Millions of records in MySQL

2002-10-25 Thread Andrey Hristov
Go to www.mysql.com and join their's general list. it's address is [EMAIL PROTECTED] Andrey - Original Message - From: Steve Vernon [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Friday, October 25, 2002 2:15 PM Subject: Re: [PHP-DB] Millions of records in MySQL Which is the MySQL

[PHP-DB] What is OCINewCollection() for?

2002-10-25 Thread dr. Agon
Hello, friends. I am working with PHP+ORACLE project. I need there to request a procedure with pl/sql table parameter. e.g. something like: TYPE tbl IS TABLE OF NUMBER INDEX BY BINARY_INTEGER; I had found OCINewCollection() function in manual. Unfrortunatly this function description is only

Re: [PHP-DB] TOO MANY CONNECTIONS!!

2002-10-25 Thread Peter Beckman
You can also do something like this: if ($db_link = mysql_pconnect($host, $user, $pass)) { if (mysql_select_db($db,$db_link)) { return $db_link; } else die(MySQL Error: Cannot select {$db} database using {$user}@{$host}: .mysql_error()); } else die(MySQL Error: Cannot connect to {$db}:

[PHP-DB] PHP and MS-SQL

2002-10-25 Thread Axel
I want to apologize for my ignorance in advance... I'm developing PHP code with MySQL on Unix platforms for quite a while. Now I'm asked to use my unix based PHP code with a MS-SQL database on a Microsoft platform. So while having the php code on a unix platform the MS-SQL database is obviously

Re: [PHP-DB] PHP and MS-SQL

2002-10-25 Thread Jeffrey_N_Dyke
yes this works. if your code is going to remian on Unix you'll have to install freetds (www.freetds.org). there are instructions on www.php.net/mssql for install in the comments... when you get to the site(freetds.org) I know it says Sysbase..but it is what you're looking for. hope this

RE: [PHP-DB] PHP and MS-SQL

2002-10-25 Thread Axel Bergmann
Great, thanks a bunch! -Original Message- From: [EMAIL PROTECTED] [mailto:Jeffrey_N_Dyke;Keane.com] Sent: Friday, October 25, 2002 3:11 PM To: Axel Cc: [EMAIL PROTECTED] Subject: Re: [PHP-DB] PHP and MS-SQL yes this works. if your code is going to remian on Unix you'll have to install

RE: [PHP-DB] select statement

2002-10-25 Thread Michael Hazelden
What's the error? -Original Message- From: Steve Dodkins [mailto:Steve.Dodkins;ebm-ziehl.co.uk] Sent: 25 October 2002 16:46 To: Php-Db (E-mail) Subject: [PHP-DB] select statement Hi I get an error message with the following statement, if I remove the 'AND

[PHP-DB] PHP and MySQL form problem - Undifined variables

2002-10-25 Thread Mario Montag
First time playing with PHP, Apache, and MySQL. I have a simple form error and I don't know how to solve it. I was doing the Webmonkey PHP/MySQL tutorial and when I started using forms with $PHP_SELF I started getting errors with variables not defined. PHP 4.2.3 MySQL 4.0 Windows 2000 Apache

[PHP-DB] Inserting checkbox data

2002-10-25 Thread Graeme McLaren
Hi all, I'm having a problem inserting a value from a checkbox into a MySQL DB. I can print out what the variable holds, the problem is it just won't go into the DB. Weird thing is when I login to SSH there isn't a NULL value for it instead that field is just blank. Anyone got any ideas what

Re: [PHP-DB] Inserting checkbox data

2002-10-25 Thread Mihail Bota
Graeme, first, extend the for loop over the if and the query for insertion of data. As you have it now, it just inserts the last element of the array. second, I think that the for loop should be $a$number. if you put =, then the loop is processing the array with the last value not assigned by you

RE: [PHP-DB] Inserting checkbox data

2002-10-25 Thread Hutchins, Richard
In addition to what Mihail had to say, I saw a couple of minor things as well. I'm not sure if they're the cause of or solution to the problem you're experiencing. First, I'm pretty sure that a value of value=\Y\ is not valid HTML. I don't know what it does to your name/value pair when you POST

[PHP-DB] URGET HELP : Logic Help - for first record do_this for each record after do_that

2002-10-25 Thread Aaron Wolski
Hey guys, Not really off topic as this involves some Db work as I have to query the DB. Got a logic problem that was jumped dumped on me from UPS (dummys!). Basically I need to pull some records out of a database and for the first record do_this logic and for each record after in the array

Re: [PHP-DB] URGET HELP : Logic Help - for first record do_thisfor each record after do_that

2002-10-25 Thread Paul Burney
on 10/25/02 2:53 PM, Aaron Wolski at [EMAIL PROTECTED] appended the following bits to my mbox: Basically I need to pull some records out of a database and for the first record do_this logic and for each record after in the array do_something_else logic. Psuedo code: $first_record = 'yes';

Re: [PHP-DB] URGET HELP : Logic Help - for first record do_this foreach record after do_that

2002-10-25 Thread Peter Beckman
$x = 1; while($row = mysql_fetch_array($result)) { if ($x) { do_something(); $x = 0; continue; } else { do_something_else(); } } This sets $x = 1 before the loop. The first time it goes through the loop it does something for the first record and sets

RE: [PHP-DB] URGET HELP : Logic Help - for first record do_this for each record after do_that

2002-10-25 Thread Hutchins, Richard
What about wrapping your logic in a counter? Set $count=1, if($count=1){do_this; then $count++;} else{do_that}. Wouldn't really add any overhead to your script since the counter only gets incremented once when the if() statement is true then stays at 2 and executes the else{} stuff after that.

Re: [PHP-DB] URGET HELP : Logic Help - for first record do_this for eachrecord after do_that

2002-10-25 Thread Jeffrey_N_Dyke
I'm sure there are a hundred ways $rs = 0; // record set array for ($i = 0; $i count($rs); ) { while($rs = mysql_fetch_array($result)) { if ($i ==0 ) { //do first thing } else { //do other things } $i++ } Jeff

RE: [PHP-DB] URGET HELP : Logic Help - for first record do_this f oreach record after do_that

2002-10-25 Thread Mihail Bota
Why not use the for loop to post the values? for ($i=0; $i$num_rows, $i++) { if ($i==0) { bla bla } else { bla2 bla2 } } $i=0 ensures that the first record of his query is retrieved. On Fri, 25 Oct 2002, Hutchins, Richard wrote: What about wrapping your logic in a counter? Set $count=1,

Re: [PHP-DB] Inserting checkbox data

2002-10-25 Thread Graeme McLaren
Mihail, thanx for your advice, I've got it going now ! :) Thank you ! Richard, your points were valid, the HTML code with the slashes was just a copy n' paste from a PHP script and the comma I think I deleted by accident so its all sorted now. Thank you again! Graeme :) - Original Message

[PHP-DB] Re: PHP and MySQL form problem - Undifined variables

2002-10-25 Thread Kris Newton
Mario, The one neat thing about PHP is when something goes wrong with the code, it usually tells you where the error is happening and like a small reason why. On line 11 of your code, you have: $PHP_SELF, this is the variable that needs to be defined as to what this string is supposed to be. PHP

[PHP-DB] Re: Print data

2002-10-25 Thread Dan Koken
We faced this problem, and decided if we couldn't get a good solution to eliminate the printer. Turns out the users liked it better, and we eliminated a lot of paper. - First we wrote a report writer. - All reports go to the database. - We wrote a report file system. - The report output title