FUDforum
Fast Uncompromising Discussions. FUDforum will get your users talking.

Home » Imported messages » comp.lang.php » problem saving date fields
Show: Today's Messages :: Polls :: Message Navigator
Return to the default flat view Create a new topic Submit Reply
Re: problem saving date fields [message #174103 is a reply to message #174099] Sat, 21 May 2011 16:08 Go to previous messageGo to previous message
Jeff North is currently offline  Jeff North
Messages: 58
Registered: November 2010
Karma:
Member
On Sat, 21 May 2011 10:32:20 -0400, in comp.lang.php Jerry Stuckle
<jstucklex(at)attglobal(dot)net>
<ir8idn$ojm$1(at)dont-email(dot)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(at)attglobal(dot)net>
> | > <ir78cp$53s$1(at)dont-email(dot)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.

> | 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.

> | >> |> 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.

[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.

> | >> | 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.
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: is dis da place?
Next Topic: foreach in reverse
Goto Forum:
  

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ]

Current Time: Fri Nov 22 20:34:39 GMT 2024

Total time taken to generate the page: 0.05599 seconds