Re: [PHP-DB] Results with ledger stripes?

2004-01-26 Thread Viorel Dragomir
Hi Dan, > Hello all, > > I'm in the midst of creating an internet speed test system thingamabob for > my website. It's basically finished...but ugly as sin. What I'd like to do > is have the results (an average of each domain tested) listed in a nice > pretty table with alternating background c

Re: [PHP-DB] Results with ledger stripes?

2004-01-26 Thread Viorel Dragomir
This is the best contact description that I found so far on the net ! To contact Dan, the owner and lead technician, please email him at [EMAIL PROTECTED] In case of dire emergency, crashed network, or other pressing need you may also contact him 24 hours a day via cell phone at xxx-xxx-xx. Please

Re: [PHP-DB] Results with ledger stripes?

2004-01-26 Thread Ricardo Lopes
I dont see what is your problem, your code do almost anything. Is you pretend to generate the output in html as you show in the example, you just have to add the color property in the "td" or "tr" tag, take care with the " in the code. ex: $dummy_var = 0; $dummy_array = array("#dd", "#ff")

RE: [PHP-DB] Results with ledger stripes?

2004-01-26 Thread Paul Fitz
Hi, You can use the modulus operator to create alternate colour rows. A bit simpler in code ;) See below - echo "DomainAverage Speed\n"; // Define count variable which is tested in loop $count = 1; while ($mongorow = mysql_fetch_array($mongo, MYS

SV: [PHP-DB] Results with ledger stripes?

2004-01-26 Thread Henrik Hornemann
Or even simpler: echo "DomainAverage Speed\n"; while ($mongorow = mysql_fetch_row($mongo, MYSQL_NUM)) { $color = ("#e4e4e4")? "#ff" : "#e4e4e4"; echo "$mongorow[0]$mongorow[1]\n"; } echo ""; Regards Henrik Hornemann -Oprindelig meddelelse- Fra: Paul Fitz [mailto:[EMAIL PROTECTED]

SV: [PHP-DB] Results with ledger stripes?

2004-01-26 Thread Henrik Hornemann
Hi, Sorry, it should of course be $color = ($color=="#e4e4e4")? "#ff" : "#e4e4e4"; -Oprindelig meddelelse- Fra: Henrik Hornemann Sendt: 26. januar 2004 13:38 Til: PHP DB Emne: SV: [PHP-DB] Results with ledger stripes? Or even simpler: echo "DomainAverage Speed\n"; while ($mongorow

RE: [PHP-DB] Results with ledger stripes?

2004-01-26 Thread Ryan Jameson (USA)
$bg1 = "#dd"; $bg2 = "#ff"; While ... $bg3 = $bg2; $bg2 = $bg1; $bg1 = $bg3; echo " Makes sense? <>< Ryan -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: Sunday, January 25, 2004 6:43 PM To: [EMAIL PROTECTED] Subject: [PHP-DB] Results with ledger

[PHP-DB] MS SQL date time strangeness

2004-01-26 Thread Steve
I have Apache 1.3 and PHP 4 running on Windows 98 connecting to a local MS SQL 7.0 server. MS SQL has the date as 2004-01-09 (-MM-DD), when I print the date to a webpage with this PHP code: printf("Date Picked Up: %s\nDate", date("Y/j/n",$row[0]); I get this output: 1969/12/31 What is wr

RE: [PHP-DB] Stroring files as BLOBs in MySQL?

2004-01-26 Thread Paul Miller
One thing that is not a huge issue, just something to be aware of is the default 2mb limit in the php.ini file. It is easily changed if you want to upload bigger files. - Paul -Original Message- From: John [mailto:[EMAIL PROTECTED] Sent: Friday, January 23, 2004 10:04 PM To: [EMAIL PROT

[PHP-DB] Images stored in a db - how to get them?

2004-01-26 Thread John T. Beresford
Hello All, I am interested in storing images in a table. My question is - What is the proper way of retrieving the images and displaying them on a web page? Will I need to go through the GD library and create an image from the information stored in the table? While PHP is not new to me, image

RE: [PHP-DB] Images stored in a db - how to get them?

2004-01-26 Thread Ryan Jameson (USA)
about once a quarter this question comes up and the answer is always the same. Don't store them in the database, just store filenames and store the files in the filesystem. That way you just generate a link and treat it like any other image. Then when you query the database you would create img ta

RE: [PHP-DB] Images stored in a db - how to get them?

2004-01-26 Thread Paul Miller
While I totally agree with Ryan, there are instances where I have found that people do not follow best practices, namely Oracle (Oracle File Storage) and many MySQL/PHP programs out there (OPT and Help Center Live). So here is some code addressing both. You would probably need an interpreter file

RE: [PHP-DB] Images stored in a db - how to get them?

2004-01-26 Thread John T. Beresford
Thanks Ryan and Paul. I agree, making references to the files is a more robust way of doing things. In fact, that's the way I normally work. I'm in the process of learning more about 'BLOBS' and exploring the reality of storing images in a db/table versus the filesystem. Anyway, thanks for the

Re: [PHP-DB] MS SQL date time strangeness

2004-01-26 Thread Robert Twitty
The date() is for use with the 32-bit C time value returned by functions like time(). Data from fields of type datetime are returned as strings in the form Jan 9 2004 by the mssql extension as the default. To return it using ISO format set mssql.datetimeconvert to "On" in the php.ini file, or use