Re: [PHP-DB] Re: Re: Sending filing attachments using PHP
Just wanted to ^bump^ this ridiculously prolonged flame-like thread which will surely be annulled in the chronicles of PHP history ;-) Michelle Konzack wrote: Am 2006-05-12 11:58:37, schrieb JupiterHost.Net: I was referring to building PHP/Apache in general * What do you talking about? -- I have compiled Apache and php5 the standard way and ABSOLUTLY NOTHING was missing. Great, I'm talking about managing multiple servers with multi needs. Generally its a cludge. If you have to build it only one a hadnfull of servers only when updates come upt, super. listen on a port lower than 1024, which is true for all tools since it's a platform limitation. * I'm speaking in generalitites of working with PHP not specifics components of the technology. ??? Generally: PHP is more prone to have the true for all tools probelms. Yeah, you're definitely smoking somethin'. The PEAR package Mail_Mime is another example of a pure-php class. It certainly does not use anything perl related at all. I'd really like to know what makes you think it does. I never said PEAR or any specific package used Perl, I'd simply offered a better solution that happend to be done in Perl. No, it is NOT a better solution, because if I use perl I have to maintain TWO scripting languages and install I do not know how many modules from CPAN... maybe 100-200? I install about 10 generally. I think you're starting to get into a my dad can beat up your dad thing which is pointless. Good day to all, sorry if I was to ambiguouse or I've offended. Good by! Seriously, chill, I wasn't getting personal. Reckon I touched a nerve. Its too bad if you don't want to consider another idea. your loss not mine :) -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- No virus found in this incoming message. Checked by AVG Anti-Virus. Version: 7.1.392 / Virus Database: 268.5.6/340 - Release Date: 15/05/2006 -- No virus found in this outgoing message. Checked by AVG Anti-Virus. Version: 7.1.392 / Virus Database: 268.5.6/340 - Release Date: 15/05/2006 -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-DB] Message (Your message dated Tue, 16 May 2006 08:32:47...)
Your message dated Tue, 16 May 2006 08:32:47 -0500 with subject Returned mail: Data format error has been submitted to the moderator of the TEX-NL list: Jules van Weerden, DIVA, VET, UU, NL [EMAIL PROTECTED]. -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-DB] MySQL: Load Data Infile
Greets, I'm trying to use the load data infile syntax within a php script. The data is in csv format. I was under the impression that I could reorder the fields during the insert, such as: load data infile 'currentData.txt' into table(fieldName2, fieldName1) fields terminated by ','; The stuff in the parentheses causes an error but without the parens, it's inserts OK. I'm sure I've done this in the past, but is was long ago. Anybody have an insight into this? David (yes, it's more MySQL than PHP related, but I'm not currently subscribed to that list...) -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DB] MySQL: Load Data Infile
Am Dienstag, 16. Mai 2006 17:40 schrieb [EMAIL PROTECTED]: Greets, I'm trying to use the load data infile syntax within a php script. The data is in csv format. I was under the impression that I could reorder the fields during the insert, such as: load data infile 'currentData.txt' into table(fieldName2, fieldName1) fields terminated by ','; The stuff in the parentheses causes an error but without the parens, it's inserts OK. I'm sure I've done this in the past, but is was long ago. Anybody have an insight into this? David (yes, it's more MySQL than PHP related, but I'm not currently subscribed to that list...) Sometimes a look into the manual is helpful! /mysql manual By default, when no column list is provided at the end of the LOAD DATA INFILE statement, input lines are expected to contain a field for each table column. If you want to load only some of a table's columns, specify a column list: LOAD DATA INFILE 'persondata.txt' INTO TABLE persondata (col1,col2,...); You must also specify a column list if the order of the fields in the input file differs from the order of the columns in the table. Otherwise, MySQL cannot tell how to match input fields with table columns. /mysql manual http://dev.mysql.com/doc/refman/4.1/en/load-data.html Best Regards, Oliver -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DB] MySQL: Load Data Infile
Am Dienstag, 16. Mai 2006 17:40 schrieb [EMAIL PROTECTED]: I'm trying to use the load data infile syntax within a php script. The data is in csv format. I was under the impression that I could reorder the fields during the insert, such as: load data infile 'currentData.txt' into table(fieldName2, fieldName1) fields terminated by ','; The stuff in the parentheses causes an error but without the parens, it's inserts OK. I'm sure I've done this in the past, but is was long ago. Anybody have an insight into this? David Sometimes a look into the manual is helpful! /mysql manual By default, when no column list is provided at the end of the LOAD DATA INFILE statement, input lines are expected to contain a field for each table column. If you want to load only some of a table's columns, specify a column list: LOAD DATA INFILE 'persondata.txt' INTO TABLE persondata (col1,col2,...); You must also specify a column list if the order of the fields in the input file differs from the order of the columns in the table. Otherwise, MySQL cannot tell how to match input fields with table columns. /mysql manual http://dev.mysql.com/doc/refman/4.1/en/load-data.html Best Regards, Oliver Ah, thanks for the nudge, Oliver! I had the manual open but I'm used to the 4.0.** series, and now I realize this is on an older 3.23.58 version. I had forgotten about this legacy system. Got the answer, thanks. David -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-DB] Date Conversion
PHP 4.4/MySQL 4.0 I am tying to convert a date to put into a database from a string (ie: January, February) to a numeric value (ie: 01,02). I am taking the value from a form, which is a drop down menu listing the months. $sMonth1 = $_POST['Smonth']; returns the money selected from the form. When I go to format the month from a string to numeric with date('m',strtotime($sMonth1)); it returns 12, no matter which month I select. In reading the docs at php.net, date('m',strtotime($sMonth1)); is correct to reformat from a string to a time format. What am I missing. mark bomgardner -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP-DB] Date Conversion
A simple associate array would work as well, although not quite as elegent. $months_arr = array(January=01, February=02...); -Original Message- From: Mark Bomgardner [mailto:[EMAIL PROTECTED] Sent: Tuesday, May 16, 2006 12:35 PM To: Php-Db Subject: [PHP-DB] Date Conversion PHP 4.4/MySQL 4.0 I am tying to convert a date to put into a database from a string (ie: January, February) to a numeric value (ie: 01,02). I am taking the value from a form, which is a drop down menu listing the months. $sMonth1 = $_POST['Smonth']; returns the money selected from the form. When I go to format the month from a string to numeric with date('m',strtotime($sMonth1)); it returns 12, no matter which month I select. In reading the docs at php.net, date('m',strtotime($sMonth1)); is correct to reformat from a string to a time format. What am I missing. mark bomgardner -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP-DB] Date Conversion
ADDENDUM: To Convert your date string, use the associate array: $months_arr = array(January=01, February =02...); $month = $months_arr[February]; * Replace $months_arr[February] with $_POST[Month]; // Output $month = 01; Ralph Brickley -Original Message- From: Ralph Brickley [mailto:[EMAIL PROTECTED] Sent: Tuesday, May 16, 2006 1:29 PM To: [EMAIL PROTECTED]; 'Php-Db' Subject: RE: [PHP-DB] Date Conversion A simple associate array would work as well, although not quite as elegent. $months_arr = array(January=01, February=02...); -Original Message- From: Mark Bomgardner [mailto:[EMAIL PROTECTED] Sent: Tuesday, May 16, 2006 12:35 PM To: Php-Db Subject: [PHP-DB] Date Conversion PHP 4.4/MySQL 4.0 I am tying to convert a date to put into a database from a string (ie: January, February) to a numeric value (ie: 01,02). I am taking the value from a form, which is a drop down menu listing the months. $sMonth1 = $_POST['Smonth']; returns the money selected from the form. When I go to format the month from a string to numeric with date('m',strtotime($sMonth1)); it returns 12, no matter which month I select. In reading the docs at php.net, date('m',strtotime($sMonth1)); is correct to reformat from a string to a time format. What am I missing. mark bomgardner -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php