php-general Digest 19 Sep 2008 08:24:41 -0000 Issue 5690

2008-09-19 Thread php-general-digest-help
php-general Digest 19 Sep 2008 08:24:41 - Issue 5690 Topics (messages 280463 through 280483): Re: ODBC Functions MS SQL Server 2005 280463 by: Micah Gersten 280464 by: Dan Joseph 280465 by: Micah Gersten 280475 by: Dan Joseph 280477 by: Thodoris

Re: [PHP] ODBC Functions MS SQL Server 2005

2008-09-19 Thread Thodoris
On Thu, Sep 18, 2008 at 4:35 PM, Micah Gersten [EMAIL PROTECTED] wrote: If you need abstraction, check this out: http://us.php.net/pdo Thank you, Micah Gersten onShore Networks Internal Developer http://www.onshore.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe,

Re: [PHP] Error message

2008-09-19 Thread Jochem Maas
Terry J Daichendt schreef: You have a real attitude problem, please don't bother with me again. actually it's you who has a problem with my attitude, not me. although I'll grant you that people like you are usually 'bother' ... and I won't anymore. -- PHP General Mailing List

[PHP] ANSI to ISO-8859-2

2008-09-19 Thread Bc. Radek Krejca
Hello, I get from webservice strings like this: #x10C;esko anglick#xE9; gymn#xE1;zium I think, that is ANSI, but how to convert it to something else (the best is iso-8859-2). I am trying iconv function, but ANSI parameter is not supported. Thank you Radek -- Regards, Bc. Radek

Re: [PHP] ANSI to ISO-8859-2

2008-09-19 Thread Per Jessen
Bc. Radek Krejca wrote: Hello, I get from webservice strings like this: #x10C;esko anglick#xE9; gymn#xE1;zium I think, that is ANSI, but how to convert it to something else (the best is iso-8859-2). I am trying iconv function, but ANSI parameter is not supported. ANSI is

Re[2]: [PHP] ANSI to ISO-8859-2

2008-09-19 Thread Bc. Radek Krejca
Hello, PJ ANSI is not a character set, it's a standards organisation. You may PJ have meant ASCII, and the string does look as if it could be ASCII. PJ The sequences like #xNNN are HTML-style symbolic entities. Take a PJ look at htmlentities(). Yes, youre right, my mistake, of course that

Re: [PHP] ANSI to ISO-8859-2

2008-09-19 Thread Robert Cummings
On Fri, 2008-09-19 at 09:39 +0200, Per Jessen wrote: Bc. Radek Krejca wrote: Hello, I get from webservice strings like this: #x10C;esko anglick#xE9; gymn#xE1;zium I think, that is ANSI, but how to convert it to something else (the best is iso-8859-2). I am trying

[PHP] Adding encryption to passwords

2008-09-19 Thread Thodoris
Hi guys I have developed an intranet web interface with user access. I am storing the passwords into a mysql table as raw text (I know not so secure). So I am adding group access features and I am thinking to encrypt the passwords because this seems to grow as a project although it started

Re: [PHP] ANSI to ISO-8859-2

2008-09-19 Thread Per Jessen
Robert Cummings wrote: On Fri, 2008-09-19 at 09:39 +0200, Per Jessen wrote: Bc. Radek Krejca wrote: Hello, I get from webservice strings like this: #x10C;esko anglick#xE9; gymn#xE1;zium I think, that is ANSI, but how to convert it to something else (the best is

Re: [PHP] Adding encryption to passwords

2008-09-19 Thread Per Jessen
Thodoris wrote: So what do you think is the best way to use crypt, mcrypt, hash or perhaps md5 and what are really the differences because I am not sure if I get it right. We use md5 for that sort of thing. /Per Jessen, Zürich -- PHP General Mailing List (http://www.php.net/) To

Re: [PHP] Adding encryption to passwords

2008-09-19 Thread Thodoris
Thodoris wrote: So what do you think is the best way to use crypt, mcrypt, hash or perhaps md5 and what are really the differences because I am not sure if I get it right. We use md5 for that sort of thing. /Per Jessen, Zürich I've noticed that crypt uses all the

Re: [PHP] Adding encryption to passwords

2008-09-19 Thread Richard Heyes
Hi guys I have developed an intranet web interface with user access. I am storing the passwords into a mysql table as raw text (I know not so secure). So I am adding group access features and I am thinking to encrypt the passwords because this seems to grow as a project although it started

[PHP] Re: Version Control Software

2008-09-19 Thread David Lidstone
Benjamin Darwin wrote: After reading a topic on the list here about someone losing their website, and having a minor mistake on my own that cost me a week's work on a file (basically, tested the file, then uploaded to the live site and took the daily backup off the live site.. only to find the

Re: [PHP] Adding encryption to passwords

2008-09-19 Thread Thodoris
Hi guys I have developed an intranet web interface with user access. I am storing the passwords into a mysql table as raw text (I know not so secure). So I am adding group access features and I am thinking to encrypt the passwords because this seems to grow as a project although it started as

Re: [PHP] Adding encryption to passwords

2008-09-19 Thread Richard Heyes
Thanks Richard for clearing this out but I meant hashing on the first place. And yet you mentioned mcrypt. Clue is in the name. Can you please give a some sample piece on how you do this. There's undoubtedly numerous examples out there. Try the PHP manual to start with. -- Richard Heyes

RE: [PHP] Adding encryption to passwords

2008-09-19 Thread Leon du Plessis
You can try the MySQL built in functions. Ie encode(str, key) insert into test (password) values (encode(mypass,some key)); You can then use the decode() functions in your matching queries. You also need to consider security of your php code, as the key to decode will be in the query strings.

Re: [PHP] Adding encryption to passwords

2008-09-19 Thread clive
Per Jessen wrote: We use md5 for that sort of thing. there is also SHA-1 bit more overhead, bit more secure than md5 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Re: __toString friends

2008-09-19 Thread Leurent Francois
Is there any feature submission process were we could discuss of this subject ? Colin Guthrie [EMAIL PROTECTED] a écrit dans le message de news: [EMAIL PROTECTED] Nathan Rixham wrote: concurred; I recently made a class that turn's all objects into XML; and implented it in my

Re: [PHP] Adding encryption to passwords

2008-09-19 Thread n3or
I use SHA-256 (use hash - php.net/manual/en/function.hash.php), because its a little bit more secure then md5 or SHA-1. BTW: Don't forget the salts.. -- Viele Grüße Dominik Strauß - www.n3or.de Webentwicklung, PHP und Linux Mobil: 0178 4940605 Internet: www.n3or.de E-Mail: [EMAIL PROTECTED]

[PHP] Re: Version Control Software

2008-09-19 Thread Maciek Sokolewicz
David Lidstone wrote: Benjamin Darwin wrote: After reading a topic on the list here about someone losing their website, and having a minor mistake on my own that cost me a week's work on a file (basically, tested the file, then uploaded to the live site and took the daily backup off the live

Re: [PHP] Adding encryption to passwords

2008-09-19 Thread Thodoris
I use SHA-256 (use hash - php.net/manual/en/function.hash.php), because its a little bit more secure then md5 or SHA-1. BTW: Don't forget the salts.. Thanks for the feedback guys it was quite helpful. -- Thodoris -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit:

RE: [PHP] Adding encryption to passwords

2008-09-19 Thread Boyd, Todd M.
-Original Message- From: Thodoris [mailto:[EMAIL PROTECTED] Sent: Friday, September 19, 2008 7:42 AM To: [EMAIL PROTECTED] Cc: php-general@lists.php.net Subject: Re: [PHP] Adding encryption to passwords I use SHA-256 (use hash - php.net/manual/en/function.hash.php), because

RE: [PHP] Re: Version Control Software

2008-09-19 Thread Boyd, Todd M.
-Original Message- From: David Lidstone [mailto:[EMAIL PROTECTED] Sent: Friday, September 19, 2008 3:50 AM To: php-general@lists.php.net; Benjamin Darwin Cc: php-general@lists.php.net Subject: [PHP] Re: Version Control Software Benjamin Darwin wrote: After reading a topic on the

[PHP] Re: Version Control Software

2008-09-19 Thread Nathan Rixham
Maciek Sokolewicz wrote: David Lidstone wrote: [snip] smartSVN (www.syntevo.com) instead of TortoiseSVN. [/snip] cheers for that one; will give it a go; tortoiseSVN is 90% there but lacks something and as you say clutter's things up a bit too much. -- PHP General Mailing List

Re: [PHP] Adding encryption to passwords

2008-09-19 Thread Nathan Rixham
Per Jessen wrote: Thodoris wrote: So what do you think is the best way to use crypt, mcrypt, hash or perhaps md5 and what are really the differences because I am not sure if I get it right. We use md5 for that sort of thing. /Per Jessen, Zürich sha 256 is my prefered encryption, no

Re: [PHP] Re: __toString friends

2008-09-19 Thread Thiago H. Pojda
http://bugs.php.net should help you out. In the bug reporting page there's a Feature request item (It's the 3rd item in the Type of bug select). Btw, I liked this idea :) On Fri, Sep 19, 2008 at 8:58 AM, Leurent Francois [EMAIL PROTECTED]wrote: Is there any feature submission process were we

[PHP] wrong behaviour with is_subclass_of() ??

2008-09-19 Thread Johannes Müller
Why does the following code ?php interface I { public function a(); } class A implements I { public function a() {} } class B extends A { } if (is_subclass_of('A', 'I')) echo A implements I\n; if (is_subclass_of('B', 'I')) echo B implements I\n; ? outputs: B implements I I would expect the

Re: [PHP] wrong behaviour with is_subclass_of() ??

2008-09-19 Thread Stut
On 19 Sep 2008, at 15:19, Johannes Müller wrote: Why does the following code ?php interface I { public function a(); } class A implements I { public function a() {} } class B extends A { } if (is_subclass_of('A', 'I')) echo A implements I\n; if (is_subclass_of('B', 'I')) echo B implements I\n;

[PHP] Passing variables between pages

2008-09-19 Thread Jason Pruim
Hi everyone, Stupid question of the week... A array variable is not being passed between 2 pages. Are my options: #1. Use sessions? #2. Use cookies? #3. Use a hidden form to pass the variable's around? Here's some context... I am working on a timecard system where they are presented the

Re: [PHP] wrong behaviour with is_subclass_of() ??

2008-09-19 Thread Johannes Mueller
Stut wrote: outputs: B implements I I would expect the following output: A implements I B implements I Because there is a big difference between extends and implements, one of which being that the class is not considered to be a subclass of an interface it implements. Seems entirely logical

Re: [PHP] Passing variables between pages

2008-09-19 Thread Dan Joseph
On Fri, Sep 19, 2008 at 10:54 AM, Jason Pruim [EMAIL PROTECTED] wrote: Hi everyone, Stupid question of the week... A array variable is not being passed between 2 pages. Are my options: #1. Use sessions? #2. Use cookies? #3. Use a hidden form to pass the variable's around? Here's some

Re: [PHP] wrong behaviour with is_subclass_of() ??

2008-09-19 Thread Stut
On 19 Sep 2008, at 15:58, Johannes Mueller wrote: Stut wrote: outputs: B implements I I would expect the following output: A implements I B implements I Because there is a big difference between extends and implements, one of which being that the class is not considered to be a subclass of

Re: [PHP] Passing variables between pages

2008-09-19 Thread Jason Pruim
On Sep 19, 2008, at 11:08 AM, Dan Joseph wrote: On Fri, Sep 19, 2008 at 10:54 AM, Jason Pruim [EMAIL PROTECTED] wrote: Hi everyone, Stupid question of the week... A array variable is not being passed between 2 pages. Are my options: #1. Use sessions? #2. Use cookies? #3. Use a hidden

[PHP] SESSIONS vs. MySQL

2008-09-19 Thread Philip Thompson
Hi all. Let me start out by saying, I have STFW and read through the list archives. Now that that's out of the way. To speed up our application, we want to implement using SESSIONs in some locations. Beforehand, on every page, we would run approximately 30-40 queries just to get the page

Re: [PHP] Passing variables between pages

2008-09-19 Thread Wolf
!-- SNIP -- Main page, login, $_SESSION gets set. !-- SNIP -- What Dan says, Sessions is the way to go with anything where you have logins and need to do more stuff with the person. Easy to set up, easy to handle... Of course, if you want to do it without sessions, you could get the session

Re: [PHP] Adding encryption to passwords

2008-09-19 Thread Philip Thompson
On Sep 19, 2008, at 9:00 AM, Nathan Rixham wrote: Per Jessen wrote: Thodoris wrote: So what do you think is the best way to use crypt, mcrypt, hash or perhaps md5 and what are really the differences because I am not sure if I get it right. We use md5 for that sort of thing. /Per Jessen,

Re: [PHP] wrong behaviour with is_subclass_of() ??

2008-09-19 Thread Jochem Maas
Johannes Müller schreef: Why does the following code ?php interface I { public function a(); } class A implements I { public function a() {} } class B extends A { } if (is_subclass_of('A', 'I')) echo A implements I\n; if (is_subclass_of('B', 'I')) echo B implements I\n; ? outputs: B implements

Re: [PHP] SESSIONS vs. MySQL

2008-09-19 Thread Wolf
Philip Thompson [EMAIL PROTECTED] wrote: Hi all. Let me start out by saying, I have STFW and read through the list archives. Now that that's out of the way. To speed up our application, we want to implement using SESSIONs in some locations. Beforehand, on every page, we would

Re: [PHP] Re: __toString friends

2008-09-19 Thread Leurent Francois
thx Thiago . I suggested there http://bugs.php.net/bug.php?id=46128 Thiago H. Pojda [EMAIL PROTECTED] a écrit dans le message de news: [EMAIL PROTECTED] http://bugs.php.net should help you out. In the bug reporting page there's a Feature request item (It's the 3rd item in the Type of bug

Re: [PHP] Passing variables between pages

2008-09-19 Thread Thodoris
Jason Pruim wrote: Hi everyone, Stupid question of the week... A array variable is not being passed between 2 pages. Are my options: #1. Use sessions? #2. Use cookies? #3. Use a hidden form to pass the variable's around? Here's some context... I am working on a timecard system where they

Re: [PHP] SESSIONS vs. MySQL

2008-09-19 Thread Philip Thompson
On Sep 19, 2008, at 10:54 AM, Wolf wrote: Philip Thompson [EMAIL PROTECTED] wrote: Hi all. Let me start out by saying, I have STFW and read through the list archives. Now that that's out of the way. To speed up our application, we want to implement using SESSIONs in some locations.

Re: [PHP] SESSIONS vs. MySQL

2008-09-19 Thread Stut
On 19 Sep 2008, at 17:05, Philip Thompson wrote: On Sep 19, 2008, at 10:54 AM, Wolf wrote: Philip Thompson [EMAIL PROTECTED] wrote: Hi all. Let me start out by saying, I have STFW and read through the list archives. Now that that's out of the way. To speed up our application, we want

Re: [PHP] SESSIONS vs. MySQL

2008-09-19 Thread Dan Joseph
On Fri, Sep 19, 2008 at 12:05 PM, Philip Thompson [EMAIL PROTECTED]wrote: On Sep 19, 2008, at 10:54 AM, Wolf wrote: Philip Thompson [EMAIL PROTECTED] wrote: Hi all. Let me start out by saying, I have STFW and read through the list archives. Now that that's out of the way. To speed

Re: [PHP] SESSIONS vs. MySQL

2008-09-19 Thread Eric Butera
On Fri, Sep 19, 2008 at 12:05 PM, Philip Thompson [EMAIL PROTECTED] wrote: On Sep 19, 2008, at 10:54 AM, Wolf wrote: Philip Thompson [EMAIL PROTECTED] wrote: Hi all. Let me start out by saying, I have STFW and read through the list archives. Now that that's out of the way. To speed

Re: [PHP] Passing variables between pages

2008-09-19 Thread tedd
At 11:15 AM -0400 9/19/08, Jason Pruim wrote: It makes perfect sense... Was just trying to avoid sessions since this application will be limited to about 10 people and restricted to the company intranet :) But the script is still stateless regardless of the number of people or if it's

Re: [PHP] Passing variables between pages

2008-09-19 Thread tedd
At 11:20 AM -0400 9/19/08, Wolf wrote: But why go around your elbow to blow your nose? Wolf Yeah, That's like pounding sand in a gopher hole -- a phrase (one of many) that my wife uses that I have yet to understand. Cheers, tedd -- --- http://sperling.com http://ancientstones.com

Re: [PHP] Passing variables between pages

2008-09-19 Thread Jason Pruim
On Sep 19, 2008, at 12:11 PM, tedd wrote: At 11:15 AM -0400 9/19/08, Jason Pruim wrote: It makes perfect sense... Was just trying to avoid sessions since this application will be limited to about 10 people and restricted to the company intranet :) But the script is still stateless

Re: [PHP] wrong behaviour with is_subclass_of() ??

2008-09-19 Thread Johannes Mueller
Jochem Maas wrote: B implements I because B subclasses A and A implements I, I is not a base class. try the experiment with is_a() instead. This was my starting point and is_subclass_of() was a sub-ordinate target, because i needed it on the class-side of life and not the instantiated

Re: [PHP] Passing variables between pages

2008-09-19 Thread tedd
At 12:22 PM -0400 9/19/08, Jason Pruim wrote: So if I'm understanding you right... You're suggesting that in my timecard app which has index.php (user login) and timecard.php (Actual time card app) I could simply load index.php and then on submit have it do this: ob_clean;

Re: [PHP] Passing variables between pages

2008-09-19 Thread Dan Joseph
On Fri, Sep 19, 2008 at 12:35 PM, tedd [EMAIL PROTECTED] wrote: At 12:22 PM -0400 9/19/08, Jason Pruim wrote: It's interesting that another topic (i.e. [PHP] SESSIONS vs. MySQL) is discussing the differences in storing variables in SESSIONS as compared to storing them in MySQL when using

Re: [PHP] wrong behaviour with is_subclass_of() ??

2008-09-19 Thread Jochem Maas
Johannes Mueller schreef: Jochem Maas wrote: B implements I because B subclasses A and A implements I, I is not a base class. try the experiment with is_a() instead. This was my starting point and is_subclass_of() was a sub-ordinate target, because i needed it on the class-side of life

[PHP] Associative array issues with loading values after initialization

2008-09-19 Thread Thomas Bolioli
The below function is not working. function crm_get_country_list(){ global $dbh; $result = mysql_query(SELECT * FROM countries ORDER BY pk_country_id ASC, $dbh) or die(mysql_error()); $country_list = array(' ' =' '); while ($row = mysql_fetch_assoc($result)){

Re: [PHP] SESSIONS vs. MySQL

2008-09-19 Thread Sancar Saran
Use memcached based session handler Regards Sancar -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Associative array issues with loading values after initialization

2008-09-19 Thread Thomas Bolioli
I should add, it is not working with this funciton, which could be the source of the issue. function dropbox_from_list($list, $selected_index){ while ($nex = next($list)) { $k = key($nex); if (strcmp($selected_index, $k) == 0) { $select = ' SELECTED'; }

Re: [PHP] Associative array issues with loading values after initialization

2008-09-19 Thread Thomas Bolioli
This came straight out of the docs and it doesn't even work. It throws PHP Parse error: syntax error, unexpected T_CONSTANT_ENCAPSED_STRING on the line 'one' = 1, What is wrong with how I am trying to do this loop?? Thanks, Tom $a = array( 'one' = 1, 'two' = 2, 'three' = 3,

Re: [PHP] Passing variables between pages

2008-09-19 Thread tedd
At 12:42 PM -0400 9/19/08, Dan Joseph wrote: On Fri, Sep 19, 2008 at 12:35 PM, tedd [EMAIL PROTECTED] wrote: At 12:22 PM -0400 9/19/08, Jason Pruim wrote: It's interesting that another topic (i.e. [PHP] SESSIONS vs. MySQL) is discussing the differences in storing variables in SESSIONS as

Re: [PHP] Associative array issues with loading values after initialization

2008-09-19 Thread b
Thomas Bolioli wrote: I should add, it is not working with this funciton, which could be the source of the issue. function dropbox_from_list($list, $selected_index){ while ($nex = next($list)) { I'd use foreach() here and avoid next(). At least, reset the array first. And maybe pass the

Re: [PHP] Associative array issues with loading values after initialization

2008-09-19 Thread Thomas Bolioli
I hav ebeen able to track down that this is the part not working. It throws a parse error: PHP Parse error: syntax error, unexpected T_VARIABLE on the line where the foreach loop starts. function dropbox_from_list($list, $selected_index){ foreach ($list as $k = $v) { if

Re: [PHP] SESSIONS vs. MySQL

2008-09-19 Thread Philip Thompson
On Sep 19, 2008, at 11:10 AM, Eric Butera wrote: On Fri, Sep 19, 2008 at 12:05 PM, Philip Thompson [EMAIL PROTECTED] wrote: On Sep 19, 2008, at 10:54 AM, Wolf wrote: Philip Thompson [EMAIL PROTECTED] wrote: Hi all. Let me start out by saying, I have STFW and read through the list

Re: [PHP] SESSIONS vs. MySQL

2008-09-19 Thread Robert Cummings
On Fri, 2008-09-19 at 12:47 -0500, Philip Thompson wrote: Why do you have so many queries? Perhaps we can attack this issue from another angle. I've narrowed it down to 10 initial queries... 1. Grab system config data (that's used in lots of places) Why not use some form of cache

Re: [PHP] SESSIONS vs. MySQL

2008-09-19 Thread Stut
On 19 Sep 2008, at 18:47, Philip Thompson wrote: I've narrowed it down to 10 initial queries... 1. Grab system config data (that's used in lots of places) Does it change often? No? Then cache it in a PHP script. Use var_export to create a file that you can include which will create the

Re: [PHP] SESSIONS vs. MySQL

2008-09-19 Thread Robert Cummings
On Fri, 2008-09-19 at 19:12 +0100, Stut wrote: Oh, and by scale I don't necessarily mean to tens of millions of page views a month. Someone needs to take away your coder badge if you make a site that can't handle 1000 views a day :) Not withstanding extreme edge cases doing unlikely

Re: [PHP] SESSIONS vs. MySQL

2008-09-19 Thread Stut
On 19 Sep 2008, at 19:20, Robert Cummings wrote: On Fri, 2008-09-19 at 19:12 +0100, Stut wrote: Oh, and by scale I don't necessarily mean to tens of millions of page views a month. Someone needs to take away your coder badge if you make a site that can't handle 1000 views a day :) Not

Re: [PHP] SESSIONS vs. MySQL

2008-09-19 Thread Robert Cummings
On Fri, 2008-09-19 at 19:32 +0100, Stut wrote: On 19 Sep 2008, at 19:20, Robert Cummings wrote: On Fri, 2008-09-19 at 19:12 +0100, Stut wrote: Oh, and by scale I don't necessarily mean to tens of millions of page views a month. Someone needs to take away your coder badge if you make a

Re: [PHP] Associative array issues with loading values after initialization

2008-09-19 Thread Thomas Bolioli
I found the issue. The whitespace in between $list as $k = $V was all not truly whitespace. Gotta love BBEdit... Thomas Bolioli wrote: I hav ebeen able to track down that this is the part not working. It throws a parse error: PHP Parse error: syntax error, unexpected T_VARIABLE on the line

[PHP] how to recognize CSV file?

2008-09-19 Thread Afan Pasalic
hi, I have form where administrator has toupload csv file to update dome data in mysql. I was trying to validate entered file but got some crazy stuff I don't understand: for the same uploaded csv file, in different browser I'll get different results: Windows machine and IE:

Re: [PHP] how to recognize CSV file?

2008-09-19 Thread Eric Butera
On Fri, Sep 19, 2008 at 2:59 PM, Afan Pasalic [EMAIL PROTECTED] wrote: hi, I have form where administrator has toupload csv file to update dome data in mysql. I was trying to validate entered file but got some crazy stuff I don't understand: for the same uploaded csv file, in different

Re: [PHP] SESSIONS vs. MySQL

2008-09-19 Thread Eric Butera
On Fri, Sep 19, 2008 at 2:50 PM, Robert Cummings [EMAIL PROTECTED] wrote: 4. lack of industry adoption There needs to be some sort of expensive test to certify one may wear the badge. Then it will have higher adoption rates. -- PHP General Mailing List (http://www.php.net/) To unsubscribe,

Re: [PHP] how to recognize CSV file?

2008-09-19 Thread Afan Pasalic
Eric Butera wrote: On Fri, Sep 19, 2008 at 3:14 PM, Afan Pasalic [EMAIL PROTECTED] wrote: Eric Butera wrote: On Fri, Sep 19, 2008 at 2:59 PM, Afan Pasalic [EMAIL PROTECTED] wrote: hi, I have form where administrator has toupload csv file to update dome data in mysql. I

Re: [PHP] SESSIONS vs. MySQL

2008-09-19 Thread Stut
On 19 Sep 2008, at 19:50, Robert Cummings wrote: On Fri, 2008-09-19 at 19:32 +0100, Stut wrote: Anyways, where can I get a coder badge, they sound cool!! ;) I just draw one with a pen on my chest to show interviewers. So far it really hasn't worked out well but I've narrowed the problem down

[PHP] Calculation assistance.. :)

2008-09-19 Thread Stephen Johnson
OK.. Math is NOT my forte ... I am converting a site from ASP to PHP ... And this calc is in the ASP Code : $nMonthlyInterest = $nRate / (12 * 100) //' Calculate monthly payment $nPayment = $nPrincipal * ( $nMonthlyInterest / (1 - (1 + $nMonthlyInterest) ^ -$iMonths)) Which then

Re: [PHP] Calculation assistance.. :)

2008-09-19 Thread Eric Gorr
I believe what you are looking is: http://us2.php.net/manual/en/function.pow.php number pow ( number $base , number $exp ) Returns base raised to the power of exp On Sep 19, 2008, at 3:34 PM, Stephen Johnson wrote: OK.. Math is NOT my forte ... I am converting a site from ASP to PHP

Re: [PHP] Calculation assistance.. :)

2008-09-19 Thread Stephen Johnson
Right ... But that is producing even funkier results... doing pow( (1-(1+$nMonthlyInterest)) , ($iMonths*-1) ) ; Gives me : 4.2502451372964E-35 = 25000 * (0.00104167 / 6.1270975733019E+35); -- Stephen Johnson c | eh The Lone Coder http://www.thelonecoder.com continuing the struggle

Re: [PHP] SESSIONS vs. MySQL

2008-09-19 Thread Philip Thompson
On Sep 19, 2008, at 1:12 PM, Stut wrote: On 19 Sep 2008, at 18:47, Philip Thompson wrote: I've narrowed it down to 10 initial queries... 1. Grab system config data (that's used in lots of places) Does it change often? No? Then cache it in a PHP script. Use var_export to create a file that

Re: [PHP] Calculation assistance.. :)

2008-09-19 Thread Eric Gorr
You originally had: $nPrincipal * ( $nMonthlyInterest / (1 - (1 + $nMonthlyInterest) ^ - $iMonths)) which, translate to in PHP $nPrincipal * ( $nMonthlyInterest / (1 - pow( ( 1 + $nMonthlyInterest ), -$iMonths ) ) ) On Sep 19, 2008, at 3:48 PM, Stephen Johnson wrote: Right ... But

Re: [PHP] SESSIONS vs. MySQL

2008-09-19 Thread tedd
At 3:11 PM -0400 9/19/08, Eric Butera wrote: On Fri, Sep 19, 2008 at 2:50 PM, Robert Cummings [EMAIL PROTECTED] wrote: 4. lack of industry adoption There needs to be some sort of expensive test to certify one may wear the badge. Then it will have higher adoption rates. I can modify

Re: [PHP] Calculation assistance.. :)

2008-09-19 Thread Eugene Mah
I think you need to do pow((1+$nMonthlyInterest),($iMonths*-1)) Eugene Stephen Johnson wrote: Right ... But that is producing even funkier results... doing pow( (1-(1+$nMonthlyInterest)) , ($iMonths*-1) ) ; Gives me : 4.2502451372964E-35 = 25000 * (0.00104167 /

Re: [PHP] SESSIONS vs. MySQL

2008-09-19 Thread Robert Cummings
On Fri, 2008-09-19 at 16:15 -0400, tedd wrote: At 3:11 PM -0400 9/19/08, Eric Butera wrote: On Fri, Sep 19, 2008 at 2:50 PM, Robert Cummings [EMAIL PROTECTED] wrote: 4. lack of industry adoption There needs to be some sort of expensive test to certify one may wear the badge. Then it

Re: [PHP] SESSIONS vs. MySQL

2008-09-19 Thread Stut
On 19 Sep 2008, at 21:22, Robert Cummings wrote: On Fri, 2008-09-19 at 16:15 -0400, tedd wrote: At 3:11 PM -0400 9/19/08, Eric Butera wrote: On Fri, Sep 19, 2008 at 2:50 PM, Robert Cummings [EMAIL PROTECTED] wrote: 4. lack of industry adoption There needs to be some sort of expensive

Re: [PHP] Calculation assistance.. :)

2008-09-19 Thread Stephen Johnson
Eric ... I LOVE YOU... Thanks -- Stephen Johnson c | eh The Lone Coder http://www.thelonecoder.com continuing the struggle against bad code http://www.fortheloveofgeeks.com I¹m a geek and I¹m OK! -- From: Eric Gorr [EMAIL PROTECTED] Date: Fri, 19 Sep 2008 16:13:49 -0400 To: Stephen

Re: [PHP] SESSIONS vs. MySQL

2008-09-19 Thread Eric Butera
On Fri, Sep 19, 2008 at 4:31 PM, Stut [EMAIL PROTECTED] wrote: On 19 Sep 2008, at 21:22, Robert Cummings wrote: On Fri, 2008-09-19 at 16:15 -0400, tedd wrote: At 3:11 PM -0400 9/19/08, Eric Butera wrote: On Fri, Sep 19, 2008 at 2:50 PM, Robert Cummings [EMAIL PROTECTED] wrote: 4. lack

Re: [PHP] SESSIONS vs. MySQL

2008-09-19 Thread Philip Thompson
I have more questions/responses throughout... On Sep 19, 2008, at 1:12 PM, Stut wrote: On 19 Sep 2008, at 18:47, Philip Thompson wrote: I've narrowed it down to 10 initial queries... 1. Grab system config data (that's used in lots of places) Does it change often? No? Then cache it in a PHP

Re: [PHP] SESSIONS vs. MySQL

2008-09-19 Thread Jason Pruim
Time's off by an hour :) I could have my graphic designer whip something up hehee :) On Sep 19, 2008, at 4:15 PM, tedd wrote: At 3:11 PM -0400 9/19/08, Eric Butera wrote: On Fri, Sep 19, 2008 at 2:50 PM, Robert Cummings [EMAIL PROTECTED] wrote: 4. lack of industry adoption There

Re: [PHP] SESSIONS vs. MySQL

2008-09-19 Thread Robert Cummings
On Fri, 2008-09-19 at 21:31 +0100, Stut wrote: I can modify this: http://webbytedd.com/bb/pdf/ He said EXPENSIVE you insensitive clod! Ahh, mood swings from ink poisoning? Tedd: Charge $100 per certificate, Rob'll buy one, maybe even two!! I've managed to avoid getting the

Re: [PHP] SESSIONS vs. MySQL

2008-09-19 Thread Stut
On 19 Sep 2008, at 21:44, Philip Thompson wrote: On Sep 19, 2008, at 1:12 PM, Stut wrote: On 19 Sep 2008, at 18:47, Philip Thompson wrote: 4. Grab user privs IMHO you should only grab these when you need them. I will need these on most pages anyway. Because of the architecture, the

Re: [PHP] SESSIONS vs. MySQL

2008-09-19 Thread Philip Thompson
On Sep 19, 2008, at 4:01 PM, Stut wrote: On 19 Sep 2008, at 21:44, Philip Thompson wrote: On Sep 19, 2008, at 1:12 PM, Stut wrote: On 19 Sep 2008, at 18:47, Philip Thompson wrote: 4. Grab user privs IMHO you should only grab these when you need them. I will need these on most pages

Re: [PHP] SESSIONS vs. MySQL

2008-09-19 Thread Stut
On 19 Sep 2008, at 22:33, Philip Thompson wrote: On Sep 19, 2008, at 4:01 PM, Stut wrote: On 19 Sep 2008, at 21:44, Philip Thompson wrote: On Sep 19, 2008, at 1:12 PM, Stut wrote: On 19 Sep 2008, at 18:47, Philip Thompson wrote: 6. Begin transaction 7. Lock user session row 8. Update user