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

Home » Imported messages » comp.lang.php » OOP, classes and databases
Show: Today's Messages :: Polls :: Message Navigator
Return to the default flat view Create a new topic Submit Reply
Re: OOP, classes and databases [message #169415 is a reply to message #169414] Fri, 10 September 2010 19:55 Go to previous messageGo to previous message
Thomas Mlynarczyk is currently offline  Thomas Mlynarczyk
Messages: 131
Registered: September 2010
Karma:
Senior Member
Thomas Mlynarczyk schrieb:
> $stmt->execute( array( $id );
Found a typo: missing ).

> else // If the record could not be found
> {
> echo 'There is no person with this id in the database.';
> }

Even better, throw an exception. Otherwise you would end up with a
Person having neither name nor address -- and that must not happen.

Greetings,
Thomas


--
Ce n'est pas parce qu'ils sont nombreux à avoir tort qu'ils ont raison!
(Coluche)
[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
Previous Topic: Best PHP way to connect to a DB across multiple pages ?
Next Topic: When do I use {}?
Goto Forum:
  

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

Current Time: Thu Nov 28 14:44:36 GMT 2024

Total time taken to generate the page: 0.04596 seconds