I am creating my own forum (for learning purpose) in PHP/MySQL and I was wondering whether I should use the built-in mysql_connect etc. functions or use PHPLib.
I was talking to a friend and he said that PHPLib wasn't very good
| SitePoint Sponsor |
I am creating my own forum (for learning purpose) in PHP/MySQL and I was wondering whether I should use the built-in mysql_connect etc. functions or use PHPLib.
I was talking to a friend and he said that PHPLib wasn't very good





Did he give a reason? I use it in nearly every one of my scripts and to tell you the truth I really like it it takes so much of the work out of it for you. I mean would you rather do this
$db = new DB;
$db->query("SELECT * from tablename");
while ($db->next_record()) {
print $db->f(fieldname);
}
or
$db = mysql_connect("host", "user", "pass");
mysql_select_db("dbname", $db);
$sql = "select * from tablename";
$result = mysql_query($sql);
while($row = mysql_fetch_array($result)) {
print $row["fieldname"];
}
I choose the first, its object-oriented and cleaner.
Please don't PM me with questions.
Use the forums, that is what they are here for.
He said it was "junk" and "pretty junky".
He also said that the class vBulletin uses (which is based on PHPLib) was much better.





Hmmm... All he could say was it is "junk" without giving reasons why? Well I guess its up to you? I prefer like I said becasue it is object oriented and cleaner but you can do as you please. As far as vBulletin being junk, Did you know this site uses vBulletin, Do you think this site is "junk" I certianly don't
Please don't PM me with questions.
Use the forums, that is what they are here for.
NO NO NO, you misunderstood me. What he said was the the vBulletin class was good. He said it was better than the PHPLib class.(because it has been modified)Originally posted by freddydoesphp
Hmmm... All he could say was it is "junk" without giving reasons why? Well I guess its up to you? I prefer like I said becasue it is object oriented and cleaner but you can do as you please. As far as vBulletin being junk, Did you know this site uses vBulletin, Do you think this site is "junk" I certianly don't
He did NOT say the class used by vBulletin was junk





I think you are confusing things. PHPLib has many classes, some are good and some aren't so good. The Session Class was good for PHP3 but is not really all that needed since PHP4 is out. The db class is the only one I use, and it is very handy. vBulletin is a class to run a forum such as this one. I am not sure if you are asking whther you should use vBulletin's class for interacting with your db? Again I cannot overemphasize that if you are gonna use classes to build your forum you should definetly use PHPLib or another object-oriented db class to handle your db interaction, believe me it will save you so much time.
Please don't PM me with questions.
Use the forums, that is what they are here for.
OK thanks for your help freddydoesphp, how long did it take you to learn php and what books/tutorials did you use?





I have been doing it for about 10 months now. I just started building stuff for the hell of it. I use a book from wrox press for awhile, but I grew out of it in a few months. I also look for posts in this forum to answer, if I don't know the answer I figure it out and test it, and then answer it, that helps me learn a lot.
Please don't PM me with questions.
Use the forums, that is what they are here for.
Bookmarks