Re: [PHP] I need some thoughts on code duplication and separation

2010-10-20 Thread Peter Lind
On 21 October 2010 04:59, David McGlone wrote: > On Thu, 2010-10-21 at 04:05 +0200, Rico Secada wrote: >> Hi. >> >> I am working on a small system where I am both trying to avoid code >> duplication and at the same time I am trying to keep the presentation >> logic separated from the application l

RE: [PHP] I need some thoughts on code duplication and separation

2010-10-20 Thread Tommy Pham
> -Original Message- > From: David McGlone [mailto:da...@dmcentral.net] > Sent: Wednesday, October 20, 2010 7:59 PM > To: php-general@lists.php.net > Subject: Re: [PHP] I need some thoughts on code duplication and separation > > On Thu, 2010-10-21 at 04:05 +0200, Rico Secada wrote: > > Hi.

Re: [PHP] I need some thoughts on code duplication and separation

2010-10-20 Thread David McGlone
On Thu, 2010-10-21 at 04:05 +0200, Rico Secada wrote: > Hi. > > I am working on a small system where I am both trying to avoid code > duplication and at the same time I am trying to keep the presentation > logic separated from the application logic. > > I am using sessions and are avoiding "heade

[PHP] I need some thoughts on code duplication and separation

2010-10-20 Thread Rico Secada
Hi. I am working on a small system where I am both trying to avoid code duplication and at the same time I am trying to keep the presentation logic separated from the application logic. I am using sessions and are avoiding "headers already sent" problem by keeping the HTML out of the application.

Re: [PHP] Re: Independent Contractor Suggestions

2010-10-20 Thread Jason Pruim
On Oct 20, 2010, at 8:47 PM, Kris Craig wrote: I hope this helps. If you like, I'd be happy to email you a sample copy of the SOW/contract I've used with past clients. Hey Kris, If you don't mind I would love a copy my self! I have started doing some freelance work and I'm always looking

Re: [PHP] Re: Possible foreach bug; seeking advice to isolate the problem

2010-10-20 Thread Tommy Pham
On Wed, Oct 20, 2010 at 4:16 PM, David Harkness wrote: > On Wed, Oct 20, 2010 at 11:08 AM, Tommy Pham wrote: >> >> hmm..  About 8-9 years ago I did a project where I used the reference >> in a foreach loop as the OP.  unset not only remove the variable but >> also the value in the array.  I tried

Re: [PHP] Re: Independent Contractor Suggestions

2010-10-20 Thread musicdev
Thanks Jason, Alexis and Kris. I appreciate the time taken to respond. Kris, you definitely touched upon a few of my current concerns. Gladly I have not quoted the client at $20 p/h. I can definitely confirm that the characteristics you described are already taking place (drama and quite d

Re: [PHP] Returning results

2010-10-20 Thread Daniel P. Brown
On Wed, Oct 20, 2010 at 21:04, Bastien wrote: > Yeah, it's got a few downsides! The next app for the iPhone should be a modification to the spell-check to verify PHP functions in emails. -- Dedicated Servers, Cloud and Cloud Hybrid Solutions, VPS, Hosting (866-) 725-4321 http://www.parasan

Re: [PHP] Returning results

2010-10-20 Thread Bastien
Yeah, it's got a few downsides! Bastien Koert 905-904-0334 Sent from my iPhone On 2010-10-20, at 8:27 PM, "Daniel P. Brown" wrote: > On Wed, Oct 20, 2010 at 20:11, Bastien wrote: >> >> David, the $result variable/object is the handle to the result data set, not >> the resulting data. You wou

Re: [PHP] Returning results

2010-10-20 Thread David McGlone
On Wed, 2010-10-20 at 20:11 -0400, Bastien wrote: > > On 2010-10-20, at 7:59 PM, David McGlone wrote: > > > Hi everyone, it's me again :-/ > > > > I'm having a whole lot of trouble figuring out how to return a result > > from a query such as in this code example: > > > > function LearnIt(){ >

[PHP] Re: Independent Contractor Suggestions

2010-10-20 Thread Kris Craig
Hi musicdev, There are a couple issues I think need to be addressed with what youd described.  First and foremost, $20/hr is considerably below the going rate for PHP work, especially for projects as large as the one you're talking about. I used to do freelance PHP work for about 5 years before I

Re: [PHP] Returning results

2010-10-20 Thread Daniel P. Brown
On Wed, Oct 20, 2010 at 20:11, Bastien wrote: > > David, the $result variable/object is the handle to the result data set, not > the resulting data. You would still need to access the data set via the > Mysql_* set of functions like Mysql-fetch_array or Mysql_result like you did > in the second

Re: [PHP] Independent Contractor Suggestions

2010-10-20 Thread Jason Pruim
On Oct 20, 2010, at 8:08 PM, wrote: Hi List, I'm currently working on a medium sized project as an independent contractor. The project is reaching the 2000 hour range and the client has asked for a project cost. The problem I have in providing the client with a proper estimate is that

Re: [PHP] Returning results

2010-10-20 Thread Bastien
On 2010-10-20, at 7:59 PM, David McGlone wrote: > Hi everyone, it's me again :-/ > > I'm having a whole lot of trouble figuring out how to return a result > from a query such as in this code example: > > function LearnIt(){ > $query = "SELECT learn_id FROM mydatabase "; > $result = mysql_qu

[PHP] Independent Contractor Suggestions

2010-10-20 Thread musicdev
Hi List, I'm currently working on a medium sized project as an independent contractor. The project is reaching the 2000 hour range and the client has asked for a project cost. The problem I have in providing the client with a proper estimate is that the client is a start-up and does not have

[PHP] Returning results

2010-10-20 Thread David McGlone
Hi everyone, it's me again :-/ I'm having a whole lot of trouble figuring out how to return a result from a query such as in this code example: function LearnIt(){ $query = "SELECT learn_id FROM mydatabase "; $result = mysql_query($query); return $result; } I already achieved a connectio

Re: [PHP] Re: Possible foreach bug; seeking advice to isolate the problem

2010-10-20 Thread David Harkness
On Wed, Oct 20, 2010 at 11:08 AM, Tommy Pham wrote: > hmm.. About 8-9 years ago I did a project where I used the reference > in a foreach loop as the OP. unset not only remove the variable but > also the value in the array. I tried several methods at that time and > ended up assigning null to

RE: [PHP] Weird Behavior

2010-10-20 Thread admin
Hm I guess the little person inside, just hates the long way of doing something. My suggestion $CD = 1287583899; $q1s = 1283313600; $q1e = 1291093200; $q2s = 1291179600; $q2e = 1298869200; $q3s = 1298955600; $q3e = 1306814400; $q4s = 1306900800; $q4e = 1314763200; for($a=1; $a<=4; $a++) {

Re: [PHP] Re: Possible foreach bug; seeking advice to isolate the problem

2010-10-20 Thread Tommy Pham
On Wed, Oct 20, 2010 at 10:44 AM, David Harkness wrote: > On Wed, Oct 20, 2010 at 5:00 AM, Tommy Pham wrote: >> >> Shouldn't that be $row = null since unset will remove the last value, not >> just removing the variable also, from the array whereas the $row = null >> will >> tell the reference poi

Re: [PHP] Calendar Logic Help

2010-10-20 Thread Floyd Resler
On Oct 20, 2010, at 12:47 PM, Tommy Pham wrote: >> -Original Message- >> From: Floyd Resler [mailto:fres...@adex-intl.com] >> Sent: Wednesday, October 20, 2010 9:17 AM >> To: PHP >> Subject: [PHP] Calendar Logic Help >> >> I'm having problems getting my head around some login for a calen

Re: [PHP] Re: Possible foreach bug; seeking advice to isolate the problem

2010-10-20 Thread David Harkness
On Wed, Oct 20, 2010 at 5:00 AM, Tommy Pham wrote: > Shouldn't that be $row = null since unset will remove the last value, not > just removing the variable also, from the array whereas the $row = null > will > tell the reference pointer that it doesn't point to a value. > No, that would assign n

RE: [PHP] Calendar Logic Help

2010-10-20 Thread Tommy Pham
> -Original Message- > From: Floyd Resler [mailto:fres...@adex-intl.com] > Sent: Wednesday, October 20, 2010 9:17 AM > To: PHP > Subject: [PHP] Calendar Logic Help > > I'm having problems getting my head around some login for a calendar. > Specifically, the problem is drawing weekly views

[PHP] Calendar Logic Help

2010-10-20 Thread Floyd Resler
I'm having problems getting my head around some login for a calendar. Specifically, the problem is drawing weekly views for events that span multiple days. I've gotten it so that if an event starts in the week being viewed, the days draw correctly for the remainder of the week. However, if th

RE: [PHP] Weird Behavior

2010-10-20 Thread Steven Buehler
it returns 1 for me. Did you put the simicolon after the values? $CD = 1287583899; $q1s = 1283313600; $q1e = 1291093200; $q2s = 1291179600; $q2e = 1298869200; $q3s = 1298955600; $q3e = 1306814400; $q4s = 1306900800; $q4e = 1314763200; -Original Message- From: Don Wieland [mailto:d...@dwda

Re: [PHP] Weird Behavior

2010-10-20 Thread Alexander Schrijver
On Wed, Oct 20, 2010 at 07:35:26AM -0700, Don Wieland wrote: > Little help please ;) > > $CD = 1287583899 > $q1s = 1283313600 > $q1e = 1291093200 > $q2s = 1291179600 > $q2e = 1298869200 > $q3s = 1298955600 > $q3e = 1306814400 > $q4s = 1306900800 > $q4e = 1314763200 > > Why does the following not

Re: [PHP] Weird Behavior

2010-10-20 Thread Daniel Brown
On Wed, Oct 20, 2010 at 10:35, Don Wieland wrote: > Little help please ;) > > $CD = 1287583899 > $q1s = 1283313600 > $q1e = 1291093200 > $q2s = 1291179600 > $q2e = 1298869200 > $q3s = 1298955600 > $q3e = 1306814400 > $q4s = 1306900800 > $q4e = 1314763200 > > Why does the following not return the v

[PHP] Weird Behavior

2010-10-20 Thread Don Wieland
Little help please ;) $CD = 1287583899 $q1s = 1283313600 $q1e = 1291093200 $q2s = 1291179600 $q2e = 1298869200 $q3s = 1298955600 $q3e = 1306814400 $q4s = 1306900800 $q4e = 1314763200 Why does the following not return the value "1" in the $qCur var // Current Quarter if($CD >= $q1s && $CD <= $q

[PHP] Re: Possible foreach bug; seeking advice to isolate the problem

2010-10-20 Thread Jonathan Sachs
On Wed, 20 Oct 2010 08:37:55 +0200, php-gene...@garydjones.name (Gary) wrote: >Better. I can tell you how to solve it: >$a = array('a', 'b','c'); >foreach($a as &$row){ >//you don't have to do anything here >} >unset($row); // <<<< THIS IS KEY! >print_r($a); >fo

Re: [PHP] Firs Day Of Week UNIX

2010-10-20 Thread Richard Quadling
On 19 October 2010 14:59, Don Wieland wrote: > Hi gang, > > I need a bailout. > > I have a fields called "sys_first_day_of_week" and the user can select one > value which will be from a menu with these options: > > Monday > Tuesday > Wednesday > Thursday > Friday > Saturday > Sunday > > Based on t

RE: [PHP] Re: Possible foreach bug; seeking advice to isolate the problem

2010-10-20 Thread Tommy Pham
> -Original Message- > From: Gary [mailto:php-gene...@garydjones.name] > Sent: Tuesday, October 19, 2010 11:38 PM > To: php-general@lists.php.net > Subject: [PHP] Re: Possible foreach bug; seeking advice to isolate the > problem > > Jonathan Sachs wrote: > > I've got a script which origina

[PHP] Error handler script

2010-10-20 Thread Teto
Hi, I've been wondering if there was any php project focusing on providing a neat php error handler ? Up to now, I've been coding mine but I've seen videos on the web where a guy was using a really impressive php error_handler. Of course I could code it but if there was something generic I could u

[PHP] Unicode - Entitiy Encoding

2010-10-20 Thread Sebastian Detert
Hi all, I'm stuck with this problem: I am trying to convert a text with any kind of unicode characters to its octet and entity equivalents. For example: Ë is Ë as octet and Ë as entity Đ is Đ as octet and Đ as entity My code works fine for some characters ( Ë works fine, but Đ fails at entit

Re: [PHP] PHP stream_socket_client OpenSSL error (unknown ca)

2010-10-20 Thread Richard
Hello again, Just to say that I have tested the script on php.net manual that generates a cert and then trys to connect (slightly modified the end of file [removing the while(true) section to just test the connection]) and I get exactly the same error. Source : http://php.net/manual/en/func