Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.php > #1756
| From | "Twayne" <nobody@devnull.spamcop.net> |
|---|---|
| Newsgroups | comp.lang.php |
| Subject | Re: problem saving date fields |
| Date | 2011-05-21 20:30 -0400 |
| Organization | A noiseless patient Spider |
| Message-ID | <ir9lfv$eh3$1@dont-email.me> (permalink) |
| References | (2 earlier) <ir78cp$53s$1@dont-email.me> <ms9et65fukkeqtr9l5ki4bq4mt11tuj4ce@4ax.com> <ir8idn$ojm$1@dont-email.me> <cgnft65mk7eet92cio9nnguq1b3fs7krbp@4ax.com> <ir9jom$663$1@dont-email.me> |
In news:ir9jom$663$1@dont-email.me, Jerry Stuckle <jstucklex@attglobal.net> typed: > On 5/21/2011 12:08 PM, Jeff North wrote: >> On Sat, 21 May 2011 10:32:20 -0400, in comp.lang.php >> Jerry Stuckle <jstucklex@attglobal.net> >> <ir8idn$ojm$1@dont-email.me> wrote: >> >>>> On 5/20/2011 11:13 PM, Jeff North wrote: >>>> >>>> <Several pieces of unrelated items snipped> >>>> >>>>> On Fri, 20 May 2011 22:35:03 -0400, in comp.lang.php >>>>> Jerry Stuckle <jstucklex@attglobal.net> >>>>> <ir78cp$53s$1@dont-email.me> wrote: >>>>> >>>>>> |> >>>>>> |> How are you setting the $arrival_* and >>>>>> $depature_* values? | >>>>>> | From the input - after is is sent from his form. >>>>> >>>>> Therefore the variables aren't initialised and would >>>>> cause php errors - right? >>>>> >>>> >>>> Not if he's programmed correctly >> >> doubtful. >> > > But you don't know that. > >>>> and is not using them. There is no >>>> need to initialize variables which are not being used. >> >> There is no need to have variables in the code that >> aren't being used. > > Yes, there is. In fact, it is quite common to have > variables in the code which are not being use *at this > time*. And very good reasons for *not* initializing them > - as a *programmer* would know. >>>>>> |> If this is a new entry then all of the >>>>>> $arrival_* and $depature_* will |> be null or >>>>>> zero - therefore the select options will not be |> automatically >>>>>> selected (View Source of the page to >>>>>> see if there are |> any error messages within >>>>>> these lists). | | No, because he isn't setting them >>>>>> until after the form has been | displayed and the >>>>>> user has made his selection. >>>>> >>>>> Methinks you are making too many assumptions - have >>>>> you seen the full source code of the page? >>>> >>>> No, but I've seen enough to understand what he's doing. >>>> >>>>> Who said anything about "add a row every time the >>>>> page is displayed". According to your criteria there >>>>> would never be any edit pages - only add pages. >>>>> >>>>> If editing an existing item wouldn't you want to >>>>> read the already stored data from the database? >>>> >>>> That's what it looked like you were trying to say. >>>> >>>>> i.e. >>>>> // initialise variables to meaningful values >>>>> // if editing an existing entry >>>>> // read record >>>>> // overwrite initialised variables >>>>> // display the page >>>>> >>>> >>>> Completely unnecessary to initialize values which are >>>> not used. >> >> If you are not using the variables then they shouldn't >> appear in the code in the first place - very sloppy >> programming. > > Just because the are not being used *at this time* > doesn't mean they shouldn't appear - as a *programmer* > would understand. >> [snip] >> >>>>> The SQL statement should be ok - it's the "When I >>>>> change of them the other one gets set back to >>>>> default: 00-00-0000" I'm considering. >>>> >>>> The SQL statement is NOT ok. As he would find if he >>>> printed it out as was suggested. >> >> If the SQL statement was not ok then the record wouldn't >> be updated. > > Or the row (tables have ROWS, not RECORDS) is not being > updated with the correct data - which is the case here. But then a > *programmer* would understand that. > >>>>>> | BTW - your sig separator is broken. It needs to >>>>>> be exactly | hyphen-hyphen-space-newline. >>>>> >>>>> Oh Jerry is now the sig line cop :-P >>>>> Complain to the writers of Thunderbird as I couldn't >>>>> care less about whether or not my sig appears >>>>> 'correctly' in your news reader. -- >>>>> ------------------------------------------------- >>>>> The supplied code is for guideline purposes only. >>>> >>>> It has nothing to do with Thunderbird. It has >>>> EVERYTHING to do with following usenet standards, in >>>> this case RFC 3736. >> >> Please highlight the line(s) from RFC 3736 that can back >> up your claim. >> >>>> But I see you're as clueless about rfcs as you are >>>> programming. >> -- ------------------------------------------------- >> The supplied code is for guideline purposes only. > > > Typo - the rfc is 3676, which you could find if you knew > how to do a simple google search. But that looks to be > beyond your capability, also. > There are three types of people who refuse to follow > accepted practices: idiots, trolls and arrogant anal > orifices. And mr suckle has just shown you all three! He's like that; a real idiot. > > Which are you?
Back to comp.lang.php | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
problem saving date fields Co <vonclausowitz@gmail.com> - 2011-05-20 11:38 -0700
Re: problem saving date fields Luuk <Luuk@invalid.lan> - 2011-05-20 20:50 +0200
Re: problem saving date fields Jeff North <jnorthau@yahoo.com.au> - 2011-05-21 08:58 +1000
Re: problem saving date fields Jerry Stuckle <jstucklex@attglobal.net> - 2011-05-20 22:35 -0400
Re: problem saving date fields Jeff North <jnorthau@yahoo.com.au> - 2011-05-21 13:13 +1000
Re: problem saving date fields Co <vonclausowitz@gmail.com> - 2011-05-20 23:47 -0700
Re: problem saving date fields Co <vonclausowitz@gmail.com> - 2011-05-21 00:18 -0700
Re: problem saving date fields Luuk <Luuk@invalid.lan> - 2011-05-21 09:54 +0200
Re: problem saving date fields Jerry Stuckle <jstucklex@attglobal.net> - 2011-05-21 10:37 -0400
Re: problem saving date fields Co <vonclausowitz@gmail.com> - 2011-05-21 08:07 -0700
Re: problem saving date fields Jerry Stuckle <jstucklex@attglobal.net> - 2011-05-21 19:55 -0400
Re: problem saving date fields Co <vonclausowitz@gmail.com> - 2011-05-22 14:20 -0700
Re: problem saving date fields Jerry Stuckle <jstucklex@attglobal.net> - 2011-05-22 17:28 -0400
Re: problem saving date fields Jerry Stuckle <jstucklex@attglobal.net> - 2011-05-21 10:32 -0400
Re: problem saving date fields Jeff North <jnorthau@yahoo.com.au> - 2011-05-22 02:08 +1000
Re: problem saving date fields Jerry Stuckle <jstucklex@attglobal.net> - 2011-05-21 20:01 -0400
Re: problem saving date fields "Twayne" <nobody@devnull.spamcop.net> - 2011-05-21 20:30 -0400
Re: problem saving date fields Jerry Stuckle <jstucklex@attglobal.net> - 2011-05-21 23:13 -0400
Re: problem saving date fields Jeff North <jnorthau@yahoo.com.au> - 2011-05-22 14:28 +1000
Re: problem saving date fields Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2011-05-22 12:45 +0200
Re: problem saving date fields Jerry Stuckle <jstucklex@attglobal.net> - 2011-05-22 08:26 -0400
Re: problem saving date fields "Twayne" <nobody@devnull.spamcop.net> - 2011-05-22 09:20 -0400
Re: problem saving date fields Jeff North <jnorthau@yahoo.com.au> - 2011-05-23 00:08 +1000
Re: problem saving date fields Jerry Stuckle <jstucklex@attglobal.net> - 2011-05-22 13:47 -0400
Re: problem saving date fields Bill B <me@privacy.net> - 2011-05-22 14:17 -0400
Re: problem saving date fields Jerry Stuckle <jstucklex@attglobal.net> - 2011-05-22 14:26 -0400
Re: problem saving date fields Bill B <me@privacy.net> - 2011-05-22 16:27 -0400
Re: problem saving date fields Jeff North <jnorthau@yahoo.com.au> - 2011-05-23 09:01 +1000
Re: problem saving date fields Jerry Stuckle <jstucklex@attglobal.net> - 2011-05-22 20:21 -0400
Re: problem saving date fields Bill B <me@privacy.net> - 2011-05-22 21:36 -0400
Re: problem saving date fields Jerry Stuckle <jstucklex@attglobal.net> - 2011-05-22 21:46 -0400
Re: problem saving date fields Jeff North <jnorthau@yahoo.com.au> - 2011-05-23 12:20 +1000
Re: problem saving date fields Jerry Stuckle <jstucklex@attglobal.net> - 2011-05-22 22:30 -0400
Re: problem saving date fields Co <vonclausowitz@gmail.com> - 2011-05-22 21:51 -0700
Re: problem saving date fields Jerry Stuckle <jstucklex@attglobal.net> - 2011-05-23 07:13 -0400
Re: problem saving date fields Co <vonclausowitz@gmail.com> - 2011-05-23 10:18 -0700
Re: problem saving date fields Co <vonclausowitz@gmail.com> - 2011-05-23 10:27 -0700
Re: problem saving date fields Jerry Stuckle <jstucklex@attglobal.net> - 2011-05-23 14:16 -0400
Re: problem saving date fields Co <vonclausowitz@gmail.com> - 2011-05-23 12:17 -0700
Re: problem saving date fields Jerry Stuckle <jstucklex@attglobal.net> - 2011-05-23 18:00 -0400
Re: problem saving date fields Co <vonclausowitz@gmail.com> - 2011-05-23 22:30 -0700
Re: problem saving date fields Jerry Stuckle <jstucklex@attglobal.net> - 2011-05-24 05:45 -0400
Re: problem saving date fields Co <vonclausowitz@gmail.com> - 2011-05-26 02:10 -0700
Re: problem saving date fields Jerry Stuckle <jstucklex@attglobal.net> - 2011-05-26 05:43 -0400
Re: problem saving date fields Co <vonclausowitz@gmail.com> - 2011-05-23 14:26 -0700
Re: problem saving date fields Jerry Stuckle <jstucklex@attglobal.net> - 2011-05-23 18:01 -0400
Re: problem saving date fields Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2011-05-23 23:59 +0200
Re: problem saving date fields "Twayne" <nobody@devnull.spamcop.net> - 2011-05-22 09:11 -0400
csiph-web