[PHP-DB] Re: Subject: PHP/DB speed

2003-12-22 Thread Neil Smth
0.9 seconds doesn't sounds too bad to me! Although, you haven't told us how big each record is, only that you have 2500 of them ! So we cannot guess. However, I would investigate the PHP gzip functions along with ob_start() so that your output can be zipped before sending to the client. Is the

[PHP-DB] Database Array Question

2003-12-22 Thread Kieran Hood
I'm new to PHP and was wondering if there's any better way of retrieving the records from the query other than using an array (This query will only return 1 row): $auth = mysql_query(SELECT username, userlevel, password, email FROM users WHERE id = '.$_SESSION['uid'].'); while ($row =

Re: [PHP-DB] Database Array Question

2003-12-22 Thread Muhammed Mamedov
! - sign adds a negative meaning to the statement. Thus, if(!isset($_SESSION['uid'])) means = If (NOT isset($_SESSION['uid']))) you know that if(statement) will work if statement returns a true value...so if $_SESSION['uid'] is already set(has some value), isset($_SESSION['uid']) will also

SV: [PHP-DB] PHP/DB speed

2003-12-22 Thread Henrik Hornemann
Hi, As others have pointed out, the real problem is the huge OPTION list. You may however get a slightly lower time by using mysql_fetch_row instead of mysql_fetch_array. Regards Henrik Hornemann -Oprindelig meddelelse- Fra: Robin Kopetzky [mailto:[EMAIL PROTECTED] Sendt: 21. december

Re: [PHP-DB] Reading emails with PHP

2003-12-22 Thread David T-G
Manuel, et al -- ...and then Manuel Lemos said... % % Hello, Hi! % ... % A more useful solution is one based on setting the return path address % of the message being sent in such a way that you can retrieve the % original recipient address from the bounced message recipient address.

[PHP-DB] Re: php mail() question

2003-12-22 Thread JeRRy
You just need to call the RetrieveMessage function that returns the headers of each message and then look for the To: header. -- Regards, Manuel Lemos Free ready to use OOP components written in PHP http://www.phpclasses.org/ Ummm, why can't you give me a working code that grabs the headers

Re: [PHP-DB] PHP/DB speed

2003-12-22 Thread JeRRy
Robin Kopetzky wrote: Good afternoon! I am writing a project and have a speed concern... The code I am using is thus and is retrieving around 2,500 records: $result = mysql_query($sql) while ($row = mysql_fetch_array($result)) { build

Re: [PHP-DB] PHP/DB speed

2003-12-22 Thread mike karthauser
On 56K the page would probably either 1) timeout on the way you have it currently or 2) only display part of the page/form and not read the whole page correctly. I dunno give us the URL, I am sure someone is on dialup to give it a wurl. Try the url with web analyzer

[PHP-DB] PHP export to CSV

2003-12-22 Thread John Greco
Anyone ever get some code to select from the DB and drop into a CSV file? -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP-DB] PHP export to CSV

2003-12-22 Thread jeffrey_n_Dyke
using mysql as an example, this is what i do. ---UNTESTED CODE -- $sql = SELECT * FROM TABLE; $res = mysql_query($sql) or die(mysql_error() . br.$sql); $fp = fopen(file_to_create.csv, w); while ($rs = mysql_fetch_row($res)) { $write_string = \ . implode(\,\, $rs) . \ \n; fwrite($fp,

[PHP-DB] Age old - Sort between two dates...

2003-12-22 Thread Tristan . Pretty
Hi all... I've searched on google without luck, and so far, no luck... I have a date field in my database, and want to select all entries in the database from date 1 -- date 2 I'll let the user decide what dates... Can anyone point me in the right direction as to what command I need? Sorry to

Re: [PHP-DB] Age old - Sort between two dates...

2003-12-22 Thread Sai Hertz And Control Systems
Dear Tristan Pretty, I have a date field in my database, and want to select all entries in the database from date 1 -- date 2 I'll let the user decide what dates... What Database are you using and its version this will give you replies not google searches Can anyone point me in the right

Re: [PHP-DB] Age old - Sort between two dates...

2003-12-22 Thread Tristan . Pretty
Ah... MySQL Version 4.0.15 I've since found this... MySQL supports the between operator for the DATE field. SELECT * FROM Appointments WHERE Moment BETWEEN StartTime AND EndTime ORDER BY StartTime; but that doesn't appear to work? Well confused now...? Sai Hertz And Control

Re: [PHP-DB] Age old - Sort between two dates...

2003-12-22 Thread Sai Hertz And Control Systems
Dear Tristan.Pretty , MySQL Version 4.0.15 I've since found this... MySQL supports the between operator for the DATE field. SELECT * FROM Appointments WHERE Moment BETWEEN StartTime AND EndTime ORDER BY StartTime; if the StartTime and EndTime are two PHP variables then use quotes

[PHP-DB] Re: php mail() question

2003-12-22 Thread Manuel Lemos
Hello, On 12/22/2003 12:13 PM, Jerry wrote: You just need to call the RetrieveMessage function that returns the headers of each message and then look for the To: header. Ummm, why can't you give me a working code that grabs the headers and put it into a textarea? Hey, I can tell you how to

[PHP-DB] Display Mysql Result in drop down list

2003-12-22 Thread irinchiang
Hi all, Right now I'm trying to retrieve one of the column tutor_name and display al the tutor's name in a drop down list. The problem now is, the drop down list only manage to display 1 record from that row instead of all tutor's name under tutor_name column...wonder where the problem

[PHP-DB] Re: php mail() question

2003-12-22 Thread JeRRy
Hi, Okay removed value and have this now: ---some code--- echo Form Action='pop_update.php' METHOD='POST' enctype='multipart/form-data'; echo textarea name='headers' cols='250' rows='5'PRE,HtmlSpecialChars($headers[$line]),/PRE/textarea'; echo input name='submit' type='submit'