[PHP] Calculate
Hi! How I can calculate following: I have table: id(int) start_date(date)end_date(date) 001 2004-03-10 2004-03-12 002 2004-03-27 2004-04-02 003 2004-04-05 2004-04-06 Total count of date is 12. But how I can calculate count of date per month? regards, gustavus -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] read and modified getting data
Hi! I have quite simple form (it has textarea input), where I can write for example: Data1 Data2 This is text So, input contains spaces, linefeeds and so on... When I make page, which read data from this textarea-field, data came from without spaces and linefeeds. How to correct this problem? Regards, gustavus -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] read and modified getting data
Hi! I have quite simple form (it has textarea input), where I can write for example: Data1 Data2 This is text So, input contains spaces, linefeeds and so on... When I make page, which read data from this textarea-field, data came from without spaces and linefeeds. How to correct this problem? Regards, gustavus -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] FTP (via firewall)
Hi! It's quite easy to write code, which connect to FTP-site (and upload one file), but How I can do it, if I had Firewall (like 123.123.123.123), and Firewall type is USER with no logon (following text from WS_FTP). Regards, gustavus -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] FTP (via firewall)
Please explain exactly what the problem is. If you had a firewall in the way and a normal FTP client couldn't login then whatever you do in PHP would not be able to get you in either. (from php.net) $conn_id = ftp_connect($ftp_server); $login_result = ftp_login($conn_id, $ftp_user_name, $ftp_user_pass); if ((!$conn_id) || (!$login_result)) { echo FTP connection has failed!; echo Attempted to connect to $ftp_server for user $ftp_user_name; exit; } else { echo Connected to $ftp_server, for user $ftp_user_name; } ... This is simple, but I have firewall How to enter firewall ip -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] page order
Hi! How I can do following: 1. i have page which list (admin) id menunamepagenameno 1 First First page 1 edit (link to edit-page) 2 Second Second page 2 edit 3 Third Third page 3 edit I can edit all field in edit-page, also no -field. How I can edit only no -field, and so that when I want to move id 2 to first page (and then id 1 move to second page. Eg. id menunamepagenameno 1 First First page 1 up down edit (link to edit-page) 2 Second Second page 2 up down edit 3 Third Third page 3 up down edit -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: page order
Hi! How I can do following: 1. i have page which list (admin) id menunamepagenameno 1 First First page 1 edit (link to edit-page) 2 Second Second page 2 edit 3 Third Third page 3 edit I can edit all field in edit-page, also no -field. How I can edit only no -field, and so that when I want to move id 2 to first page (and then id 1 move to second page. Eg. id menunamepagenameno 1 First First page 1 up down edit (link to edit-page) 2 Second Second page 2 up down edit 3 Third Third page 3 up down edit -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Generate automatic list of dates
Hi! $first_date = 2003-12-01 $end_date = 2004-01-15 while ( $first_date = $end_date) { $sql = INSERT INTO time_table (id, date, person_id) VALUES (35,$first_date,0); $result = mysql_query($sql, $conn); [next date] WHAT CODE TO HERE } eg. first insert row is 35, 2003-12-01,0 next should be 35,2003-12-02,0 etc ... and last 35,2004-01-15,0 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Simple table sorting
Hi! I have simple table like: namedepartment [data: first name] [data: dep. no] [data: second name] [data: dep. no] Now I have only sorting which sorts using ORDER BY name. How I make header name / department active link, which I can change sorting order Department and then back to Name? regards, gustavus -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Ingress II
Hi! I have following problem: An Ingress II ver. 2.0 DB. I should be read it data into MySql DB (Once a day). But first! How I can connect to Ingress DB? gustavus -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Date-format
Hi! I have web-form, which has field (10 chars), there I enter date (format dd.mm.). Then data saves to database (date-field type is date). So everything works, but not fine. When I enter date in format ex. 31.12.2002 and save form, then I'll check what are in db (there are 2031-12-20). Is there any chance to correct this problem. I have (in clause which insert to db): GetSQLValueString($HTTP_POST_VARS['date'], date) gustavus -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Date-format
Well, insert format in wrong, but in Finland enter format is dd.mm., so I cannot use other insert format (it have to do other way). gustavus It looks to me like the database is interpreting your date incorrectly. Try changing the format you use to insert, -mm-dd -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] ucwords()?
Hi! I'll try to convert field first char to upper by using ucwords(). Well, this doesn't seem to work correct. Well maybe error came, because that characteres are not standard (they are special characterers, finnish language). Example: $work_text = perhepäivähoitaja; $work_text = ucwords (strtolower ($work_text); print $work_name - PerhepäIväHoitaja). Every char after finnish-ä is upper. How I can correct this error?? gustavus
[PHP] strtolower - strtoupper
Hi! Again, problem to convert chars. example: $name = mattson-hedman # correct format is Mattson-Hedman, but user can write in many ways. $name came from db. so how I can convert this $name format Mattson-Hedman. First name first-letter is easy, but how about second-name first-letter H. There are always char '-' before char which should be convert. gustavus -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php