[PHP] Calculate

2004-03-16 Thread Tommi Virtanen
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

[PHP] read and modified getting data

2004-02-23 Thread Tommi Virtanen
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

[PHP] read and modified getting data

2004-02-23 Thread Tommi Virtanen
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

[PHP] FTP (via firewall)

2004-02-18 Thread Tommi Virtanen
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

Re: [PHP] FTP (via firewall)

2004-02-18 Thread Tommi Virtanen
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,

[PHP] page order

2004-01-22 Thread Tommi Virtanen
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

[PHP] Re: page order

2004-01-22 Thread Tommi Virtanen
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

[PHP] Generate automatic list of dates

2003-12-02 Thread Tommi Virtanen
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

[PHP] Simple table sorting

2003-12-02 Thread Tommi Virtanen
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

[PHP] Ingress II

2003-08-26 Thread Tommi Virtanen
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

2002-09-12 Thread Tommi Virtanen
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).

Re: [PHP] Date-format

2002-09-12 Thread Tommi Virtanen
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

[PHP] ucwords()?

2002-09-11 Thread Tommi Virtanen
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

[PHP] strtolower - strtoupper

2002-09-11 Thread Tommi Virtanen
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.