Are most forum scripts tied to an SQL database? Or do some scripts reside solely in PHP, ASP, or ASP.NET/C#/VB code without an SQL database for posts and user accounts?
Has anyone tried to write their own forum software?
Are most forum scripts tied to an SQL database? Or do some scripts reside solely in PHP, ASP, or ASP.NET/C#/VB code without an SQL database for posts and user accounts?
Has anyone tried to write their own forum software?
I am writing my own software. It will take you a long time to do, and I would say the average programmer would not be able to write a better software than what is out there currently.
A mysql query will take probably around 10 to 100 times less to execute than file access, so SQL is really the only viable option.
Please add to myReputation (bottom left corner) if you find my post helpful! (Why?) Thank You!
We have to unify and watch our flag ascend
if you want a forum for just your own purpose then you should not code the forum ... there are lots of free forum available like smf, phpbb they are nice
I have yet to see a forum that does not use any kinda of SQL.
If your going to make your own forum, your in for a long programming trip.
Your first probably going to have to come up with the database design (like for most scripts). then the layout of your program (how it looks when viewed), then how it functions (how the program is made).
In short, it's a major hassle. If your going to create your own forum, i would suggest making it just a simple help forum, like for video game help, or a product.
Just use an existing forum package out there, MyBB is pretty good.
You'll have to store data somehow. You don't have to use a relational database (an object database is an alternative), and you don't need to use a DBMS that uses SQL, but you don't want to write you own DBMS. For one thing, it will take awhile to implement all the functionality. For another, you'll probably get something wrong, unless you're a DB guru.
Read the thread where merrillmck asked "Why use SQL anyway?" which expands on this post.
Last edited by misson; 07-02-2009 at 11:54 AM.
Be sure to read all pages linked in this post; they have further information that should prove useful. When asking for help, make sure you follow Eric Raymond's guidelines for prompt, accurate responses. Please answer any questions I ask; they're not rhetorical (probably). Any posted code is intended as illustrative example, rather than a solution to your problem to be copied without alteration. Study it to learn how to write your own solution.
Misson, not Mission.
YaBB.
![]()
For any .NET programmers:
I found this open-source ASP.NET/C# forum:
http://www.yetanotherforum.net/
It uses Microsoft SQL Server which I believe is incompatible with X10. However, I think one could go and substitute all the MS SQL references with MySQL references ...
I actually don't use MySQL at all, yet I'm able to make forum-like sections on my site (http://www.algebrahelper.x10hosting.com/feedback.php). My secret is I just use the PHP fread, fwrite, fopen commands. Its simple really. The feedback page reads a .txt file (using fread()), then posts its output on the page (using print()). When you go to submit a post, it checks to see if you're logged in, then it prompts you for your comment. When you click submit, it simply writes your comment to the .txt file (using fwrite()). This may seem insecure, but remember, nobody can see the PHP code of your .php file, so its actually very secure. Its my simple way to getting out of MySQL, or using any other database.
Last edited by drf1229; 07-04-2009 at 12:50 PM.
Yeah, it's definitely possible to use files instead of SQL (SQL uses files itself) but SQL is so highly optimized for the task, anything you program will not be nearly as quick.
Please add to myReputation (bottom left corner) if you find my post helpful! (Why?) Thank You!
We have to unify and watch our flag ascend
Probably true, but I still use purely PHP, it seems easier to me.