php-general Digest 31 May 2008 08:23:57 -0000 Issue 5489
Topics (messages 274888 through 274891):
going from procedural style to object orientated style coding
274888 by: Adam Williams
274889 by: Bastien Koert
274890 by: Dan Joseph
Update does not work...but no errors either
274891 by: Ryan S
Administrivia:
To subscribe to the digest, e-mail:
[EMAIL PROTECTED]
To unsubscribe from the digest, e-mail:
[EMAIL PROTECTED]
To post to the list, e-mail:
[EMAIL PROTECTED]
----------------------------------------------------------------------
--- Begin Message ---
I was wondering if anyone knew of some books/tutorials/howto's, etc on
going from procedural style coding to object orientated coding with
PHP? I've been using PHP since version 3 and am used to the procedural
style, but I'm noticing that PHP's trend is going to the object
orientated style, but I'm not familiar with that style. Any suggestions
on how to make the switch to coding in object orientated style?
--- End Message ---
--- Begin Message ---
On 5/30/08, Adam Williams <[EMAIL PROTECTED]> wrote:
>
> I was wondering if anyone knew of some books/tutorials/howto's, etc on
> going from procedural style coding to object orientated coding with PHP?
> I've been using PHP since version 3 and am used to the procedural style,
> but I'm noticing that PHP's trend is going to the object orientated style,
> but I'm not familiar with that style. Any suggestions on how to make the
> switch to coding in object orientated style?
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>
There are a couple of books that I have been using
Object Oriented PHP Concepts
http://www.amazon.com/Object-Oriented-PHP-Concepts-Techniques-Code/dp/1593270771/ref=pd_bbs_sr_1?ie=UTF8&s=books&qid=1212179023&sr=1-1
headfirst OO A&D
http://www.amazon.com/Head-First-Object-Oriented-Analysis-Design/dp/0596008678/ref=pd_sim_b_img_4
PHP architects guide to PHP Design patterns
http://www.amazon.com/PHP-Architects-Guide-Design-Patterns/dp/0973589825/ref=sr_1_3?ie=UTF8&s=books&qid=1212179213&sr=1-3
--
Bastien
Cat, the other other white meat
--- End Message ---
--- Begin Message ---
On Fri, May 30, 2008 at 4:17 PM, Adam Williams <[EMAIL PROTECTED]>
wrote:
> I was wondering if anyone knew of some books/tutorials/howto's, etc on
> going from procedural style coding to object orientated coding with PHP?
> I've been using PHP since version 3 and am used to the procedural style,
> but I'm noticing that PHP's trend is going to the object orientated style,
> but I'm not familiar with that style. Any suggestions on how to make the
> switch to coding in object orientated style?
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>
If you want to go the book route, look for "Design Patterns" on Amazon.com,
its a good general overview. That's how I got started, from there it starts
to become natural for you. Maybe search around different PHP 5 OOP
tutorials and look at some frameworks.
--
-Dan Joseph
www.canishosting.com - Plans start @ $1.99/month.
"Build a man a fire, and he will be warm for the rest of the day.
Light a man on fire, and will be warm for the rest of his life."
--- End Message ---
--- Begin Message ---
Hey,
This is my code:
==============================================================
$update_sql="update greetings_final set
heading='$heading',message='$message',signature='$signature',font_size='$font_size',font_color='$font_color',bg_color='$bg_color'
where temp_cno='".$thecno."' and rand_string='".$randreference."' LIMIT 5";
echo $update_sql."<br><br>";
$result2 = mysql_query($update_sql);
if(mysql_affected_rows()==0){echo "Error R093d: unable to update
greeting";exit;}
==============================================================
As you can see above, i have a echo to show me the exact SQL being run
and also a mysql_affected_rows check to spit out an error if no rows get updated
but for some reason.... no rows are getting updated but mysql is not echoing
that error message plus
the sql is running perfectly if i copy and paste it from the echo into
phpmyadmin
any ideas?
Thanks!
R
--- End Message ---