TalkPHP
 
 
Account Login
Latest Articles
» The basic usage of PHPTAL, a XML/XHTML template library for PHP
» Vulnerable methods and the areas they are commonly trusted in.
» Simple way to protect a form from bot
» The Basics On: How Session Stealing Works
» How to keep your forms from double posting data
IRC Channel
IRC Speech Bubble Join the friendly bunch on IRC...
(#TalkPHP on Freenode)

...Also available via a web interface.

See this thread for information on the TalkPHP Free Hugs Initiative™. Subject to availability.
Associates
Associates
CSS Tutorials
Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old 12-03-2007, 12:35 PM   #1 (permalink)
The Contributor
Upcoming Programmer 
 
Gurnk's Avatar
 
Join Date: Oct 2007
Location: US
Posts: 66
Thanks: 19
Gurnk is on a distinguished road
Bricks Whats Next?

Yo! I need your help guys. I'm trying to decide what I should do next with PHP. Right now, all my web stuff that I do in PHP, I mostly do like the following.

PHP Code:
$select = @mysql_query("SELECT * FROM users WHERE username = '$username'");
while(
$row mysql_fetch_array($select)) {
      
// do something specific for this user.

And I don't think that is a horrible way of doing things, and its not like the code is completely disgusting; I'm just wondering if I should move onto something like OOP for that kind of stuff. I have seen some examples of OOP, but personally, I don't think it looks like it would necessarily be the better way to go. Maybe I am completely off.

So I guess the question is, if I'm going to mainly be doing stuff like I showed you, just getting database info, and manipulating it, is there a need to make a bunch of classes and what not? I already make functions for stuff that is repetitive.

What are you thoughts or ideas.
Send a message via MSN to Gurnk
Gurnk is offline  
Reply With Quote
Reply



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


All times are GMT. The time now is 07:00 PM.

 
     

Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.1.0
Inactive Reminders By Icora Web Design