Re: [PHP-DB] Failed to query correctly.
Hi, I just looked over the code I sent and I saw that there is a bug there. Here's the corrected version. This one is tested and it works fine $query=SELECT * from $tbl; $result=mysql_db_query($db,$query) or mysql_die(); echo table; while ($line = mysql_fetch_assoc($result)) { if (!$firstrow){ echo tr; while(list($col_name, $col_value) = each($line)) { print \t\ttdp align=center$col_name/p/td\n; $firstrow.=\t\ttdp align=center$col_value/p/td\n; } echo /tr; echo tr$firstrow/tr; } else{ echo tr; while(list($col_name, $col_value) = each($line)) { print \t\ttdp align=center$col_value/p/td\n; } echo /tr; } } echo /table; Hope this helps Dobromir Velev Web Developer http://www.websitepulse.com/ -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP-DB] How To Greatly Increase Your Calling Area ... [cazmt]
http://pavilion/pgm/adcopy/booster.html Increase your cell phone reception for just $14.99 Click Here We will increase your reception dramatically or your money back! Enhance your cell phone, pager, or two way radio's signal for better reception in large buildings, tunnels, elevators, and many other places where the signal may get weak causing static, missed calls, dropped calls, etc. This easy-to-install internal antenna is like adding 4 feet worth of antenna to your phone! this signal booster will: reduce static provide clarity stabilize reception work on any phone work on any system Easy to Install Just slip in behind battery! Get a FREE anti-radiation shield! Click Here 30 Day Money Back Guarantee! Address Removal Instructions This advertisement provides all recipients with a no-cost method to permanently remove thier e-mail address from future mailings. To permanently remove your address click here to send your request.
Re: [PHP-DB] onClick
Hi Jonathan Duncan, Is it possible to call a PHP function using the onclick parameter? If this should be a javascript-mouseevent you have to use onmouseup instead. Regards, Ruprecht -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP-DB] Getting apache to recognizeindex.php....
Can anyone tell me where to configure apache so that it recognizes index.php as the index of a directory? I tried looking through the httpd.conf file for the option to add an extension...couldn't see anything! My server treats index.html files correctly...(but is not working with index.php)! HELP! Thank you, Vincent -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
RE: [PHP-DB] Getting apache to recognizeindex.php....
You were correct as to the file to look in. The directive passed is: DirectoryIndex index.html Change this to read: DirectoryIndex index.html index.php And that should be it. You may need the Apache Module mod_dir, but I'm not entirely sure, here's what my config looks like: # DirectoryIndex: Name of the file or files to use as a pre-written HTML # directory index. Separate multiple entries with spaces. # IfModule mod_dir.c DirectoryIndex index.html index.php index.htm /IfModule Ryan Marrs Web Developer Sandler and Travis Trade Advisory Services, Inc. 248.474.7200 x 183 http://www.strtrade.com -Original Message- From: Vincent Beaulieu [mailto:[EMAIL PROTECTED]] Sent: Tuesday, December 04, 2001 11:23 AM To: [EMAIL PROTECTED] Subject: [PHP-DB] Getting apache to recognizeindex.php Can anyone tell me where to configure apache so that it recognizes index.php as the index of a directory? I tried looking through the httpd.conf file for the option to add an extension...couldn't see anything! My server treats index.html files correctly...(but is not working with index.php)! HELP! Thank you, Vincent -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP-DB] Getting apache to recognizeindex.php....
On Wednesday 05 December 2001 00:22, Vincent Beaulieu wrote: Can anyone tell me where to configure apache so that it recognizes index.php as the index of a directory? I tried looking through the httpd.conf file for the option to add an extension...couldn't see anything! My server treats index.html files correctly...(but is not working with index.php)! You should have a line similar to this: DirectoryIndex index.html index.htm index.shtml index.php hth -- Jason Wong - Gremlins Associates - www.gremlins.com.hk /* Give me chastity and continence, but not just now. -- St. Augustine */ -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP-DB] RE: Getting apache to recognizeindex.php....
Vincent: Find the DIRECTORYINDEX attribute in httpd.conf and add 'index.php' to the list: DIRECTORYINDEX index.html index.php index.wml homepage.html index.shtml homepage.shtml index.cgi homepage.cgi index.htm \ Index.html Homepage.html Index.shtml Homepage.shtml Index.cgi Homepage.cgi Index.htm Let me know if you need further clarification. -luke Luke Muszkiewicz Pure Development, LLC http://puredev.com -Original Message- From: Vincent Beaulieu [mailto:[EMAIL PROTECTED]] Sent: Tuesday, December 04, 2001 9:23 AM To: [EMAIL PROTECTED] Subject: Getting apache to recognizeindex.php Can anyone tell me where to configure apache so that it recognizes index.php as the index of a directory? I tried looking through the httpd.conf file for the option to add an extension...couldn't see anything! My server treats index.html files correctly...(but is not working with index.php)! HELP! Thank you, Vincent -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
RE: [PHP-DB] RE: Getting apache to recognizeindex.php....
Luke M. said: Find the DIRECTORYINDEX attribute in httpd.conf and add 'index.php' to the list: DIRECTORYINDEX index.html index.php index.wml homepage.html index.shtml homepage.shtml index.cgi homepage.cgi index.htm \ Index.html Homepage.html Index.shtml Homepage.shtml Index.cgi Homepage.cgi Index.htm Another thing to note... the closer to the beginning of the DirectoryIndex directive, the higher the precedence it takes. What that means is, a single directory can have any one of the above files in it... the one that Apache will use *first* when accessing the directory name is the one that it *matches* in the directoryindex list *first*. So, if for example, you have four files from the above mentioned list (homepage.shtml, index.shtml, index.cgi, and index.php).. the one it'll use first when deciding which one to run when just the directory is accessed would be index.php because it's the second entry of the list (above) and the first entry (index.html) doesn't exist in the directory. -- __ _Tyler Nally / /__ _(_)___ _ _ [EMAIL PROTECTED] / / _ \/ __ `/ / __ \/ __ \ / __ \/ ___/ __ `/ 317-860-3016 / / __/ /_/ / / /_/ / / / // /_/ / / / /_/ / American Legion Website /_/\___/\__, /_/\/_/ /_(_)/_/ \__, /http://www.legion.org // // -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP-DB] RE: TO TIM FOSTER - REGARDING THE ALTERNATING ROWS PULLED FROM TABLES
Thanks for the response. I too have been a programmer for about years. (sorry, I couldn't resist ;) I forgot all about testing my approach on PHP, so I went ahead and gave it a shot today. I don't remember what I posted in my pseudocode, but I only encountered a minor syntax error when I wrote it off the top of my head. I'm not sure what problems you saw earler, but here's what I came up with today (it works on my WinNT development box): html body bgcolor=#FF table border=1 ? $col = array(#FF,#EEFFEE); for ($i=0; $i10; $i++) { % tr bgcolor=?=$col[$i % 2 ]% tdrow ?=$i%, cell 1/td tdrow ?=$i%, cell 2/td tdrow ?=$i%, cell 3/td /tr ? } % /table /body /html This prints out a table that's 3 colums wide and 10 rows high, with each row alternating colors between green and white. There are a couple of reasons I offered this approach: 1. Speed. It doesnt repeatedly use a function inside the loop to determine the current color. I would think this would be desireable. I'm betting/guessing that calling a function then comparing it to a value then sticking it in an array is slower than accessing an element of an array using %. 2. Flexibility. If you need more than 2 colors, you just expand the array and change the modulus number from 2 to however many colors you want. I'm still fairly new to all things *nix, so my handling of regular expressions is simply not what it should be. When I look at the ereg() you've got... I'm scratching my head. (but I *think* I know what you're doing). TIM -Depression is merely anger without enthusiasm. -Original Message- From: Vins [mailto:[EMAIL PROTECTED]] Sent: Monday, December 03, 2001 3:27 PM To: [EMAIL PROTECTED] Subject: TO TIM FOSTER - REGARDING THE ALTERNATING ROWS PULLED FROM TABLES Hi Tim. I'm a programerr in PHP4 for about years now and just by looking at your script i can tell it wont work ! First of all, if would be dificult for a begginer developer to implement in their script. For more advanced developers it will be a great challenge for them to try to get ti to work ! I've created my own little Row Alternator for pulling rows from a table. if(ereg(1$|3$|5$|7$|9$, $i)) { $bg[$i] = #33; } else { $bg[$i] = #339966; } Place this script snipet in the function where you have detected if there is actually a result and then just call the bg like this echo TD BGCOLOR=\.$bg[$i].\\n; This sould help alot more. Please dont think that I'm hammering your scripting skills. I'm not. Just a thought. Regards Vins. [EMAIL PROTECTED] -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP-DB] Connecting to Microsoft Mail
Dear ALL, I want to know if there's a way to have the mail sent by PHP mail() function captured by microsoft outlook. I'm using PWS / windows98 / PHP4 Thanks Get your own 800 number Voicemail, fax, email, and a lot more http://www.ureach.com/reg/tag -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP-DB] Re: Unable to Open ORACLE
On Mon, Dec 03, 2001 at 10:16:13PM -0800, John Kolvereid wrote: Hi, Me again, My table has a CLOB in it. Could that be a problem. When I tried the same querry on another table w/o a CLOB it succeeded. Please advise. Thanks. CLOBS were indroduced in oracle8 you need to use the oci*() functions to get them from the database. the ora*() functions do not (and will never) support this datatype as it's technically not possible. your problem will vanish once you use the oci*() functions. tc John Kolvereid wrote: Hi, I tried the following snippet from http://www.php.net/manual/en/ref.oracle.php $query = Select * from patients where clientid = 'DEMO'; ora_parse($curs, $query); ora_exec($curs); ora_fetch($curs); The parse executed successfully, but the exec complained that Ora_Exec failed (ORA-00932: inconsistent datatypes -- while processing OCI function OEXEC/OEXN) Earlier I had taken an example from Thies Arntzen's conf notes and successfully opened, parsed and fetehed, using the same query and the same db, only w/ OCI commands. Is there a problem w/ the ordinary Oracle functions, possibly w/ a mismatch between them and the undelying OCI codes? Please advise. Thank you. -- John Kolvereid http://www.odinfo.com http://www.kolvereid.com [EMAIL PROTECTED] 1.610.296.4485 -- John Kolvereid http://www.odinfo.com http://www.kolvereid.com [EMAIL PROTECTED] 1.610.296.4485 -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP-DB] install mysql from source
Does anybody install mysql from source and able to insert binary data into mysql? I have tested it in the source installation MySQL server in RedHat 7.2 with PHP and found that the image can only be stored and retrival from mysql using PHP when the image's size is smaller than 1K. Although, I increase the size of mysql's max_allowed_packet, net_buffer, table_cache. But when I install MySQL rpm and do nothing change to mysqld configuration, it works properly when I insert and retrival image from mysql even the image's size is larger than 500K. Anybody know the reasons? Thank you very much! -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP-DB] new to the list / questions
Hi guys, I just joined this list today, and I'm already seeking for advice :) So, I'm working on a project for my university. The project consists in a web interface (php) and a mysql database. The purpose of this project is to let teachers make room reservations for specific classes at specific times. I have been working with C and some other programming languages before, and found php to be similar, although I still have some small things to clarify here and there. At the present moment, I have already implemented the most part of this project, but I got stuck with the error handling. (Most likely because I do not know a lot about php - mysql connectivity) I need to make a check at the time the user submits a new entry, that the new entry won't overlap timewise with other entries already in the database. The only thing that needs to be checked is the time, in a certain day/month/year. (Reservations cannot be carried over to a different day). Here's how my selected table looks like: $tables = CREATE TABLE selected ( id int(3) ZEROFILL unsigned auto_increment NOT NULL, month tinyint(3) unsigned NOT NULL DEFAULT '0', date tinyint(3) unsigned NOT NULL DEFAULT '0', year smallint(4) unsigned NOT NULL DEFAULT '0', time_start smallint(4) unsigned NOT NULL DEFAULT '0', time_end smallint(4) unsigned NOT NULL DEFAULT '0', class tinytext, special_request blob, PRIMARY KEY (id), UNIQUE id (id), INDEX id_2 (id) ); And below is a piece of code with my attempts to do the check. (mysql does not like it, so I'm assuming it's not correct). ---BEGIN--- ?php if($submit) { if(!$db = mysql_connect(, , l)) die(font color=\#FF\Error, I could not connect to the database at $dbserver. Using username $dbuser and password $dbpass.BRPlease go back and try again.); $x = mysql_select_db(lcdb, $db); flush(); $sql=Select * FROM selected WHERE (( start_time $start_time) ( end_time $end_time ) ( start_time $end_time ) ( end_time $start_time )) || (( start_time $start_time) ( end_time $end_time ) ( start_time $end_time ) ( end_time $start_time )); $r = mysql_query($sql, $db); if ($row = mysql_num_rows($r)) { $sql = INSERT INTO selected (time_start, time_end, date, month, year, class, special_request) VALUES ('$start_time', '$end_time', '$day', '$month', '$year','$cla ss','$special_needs'); if(!mysql_query($sql, $db)) { echo $sql . : . mysql_error() . br; die($!); } echo brTABLE BORDER=\0\ CELLPADDING=\1\ CELLSPACEING=\0\ ALIGN=\CENTER\ VALIGN=\TOP\ WIDTH=\100%\; echo TRTD BGCOLOR=\$table_bgcolor\TABLE BORDER=\0\ CALLPADDING=\1\ CELLSPACEING=\1\ WIDTH=\100%\; echo TR BGCOLOR=\FF\ ALIGN=\LEFT\TDfont face=\Verdana\ size=\2\P; echo PBRcenterYour Reservation has been made.PClick here to go back to the listing./a/font; echo /TD/TR/TABLE/TD/TR/TABLEbr; } else die(Error!); } else { -END So... If any of you could help me out, I would GREATLY appreciate it. Thanks in advance, Ion -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP-DB] 5928 Would you like to lose weight while you sleep? 537417
As seen on NBC, CBS, CNN, and even Oprah! The health discovery that actually reverses aging while burning fat, without dieting or exercise! This proven discovery has even been reported on by the New England Journal of Medicine. Forget aging and dieting forever! And it's Guaranteed! Click here: http://ultimatehgh1000.81832.com Would you like to lose weight while you sleep! No dieting! No hunger pains! No Cravings! No strenuous exercise! Change your life forever! 100% GUARANTEED! 1.Body Fat Loss82% improvement. 2.Wrinkle Reduction 61% improvement. 3.Energy Level 84% improvement. 4.Muscle Strength 88% improvement. 5.Sexual Potency 75% improvement. 6.Emotional Stability 67% improvement. 7.Memory62% improvement. You are receiving this email as a subscriber to the Opt-In America Mailing List. To remove yourself from all related maillists, just click here: mailto:[EMAIL PROTECTED]?Subject=REMOVE -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]