View Full Version : Need help - Populating a web template using mysql
bmwr1200c
03-05-2012, 02:28 PM
I am working on Mac, I have installed MAMP & joomla.
I have a need to create a website which has 24,000 html (each containing a verse and is meaning ~ about 10 kb size) and 24,000 corresponding audios (~about less than a min each) This is the overall content.
I do not want to create static pages that would be too laborious.
This is what I have done so far.
1. I have all the required html files link in mysql database
2. Also have all the audio files link in mysql database
3. Created a webpage template
This is what I need.
1. Pull the data from these tables and show it at specific location on the template
2. Populate the menus dynamically.
Is it something doable, would it require extensive programming knowledge? Can you give me some idea to achieve this goal.
I would really appreciate your help,
Are you planning on using joomla? or do you want to write something yourself?
If you know the basics of PHP, this isn't too difficult a task. But if you're truly "starting from scratch," be aware that it might be a long project. :)
bmwr1200c
03-05-2012, 03:35 PM
Are you planning on using joomla? or do you want to write something yourself?
If you know the basics of PHP, this isn't too difficult a task. But if you're truly "starting from scratch," be aware that it might be a long project. :)
Yes, I am planning to use joomla, and its template. I do not know PHP. I was wondering if there is an working example I can get from where I can build and learn as well. Can you give me some pointers so I can start in this direction
djr33
03-05-2012, 06:30 PM
That's a standard project with PHP and MySQL. Using Joomla may or may not be easier, because it can give you some shortcuts in some ways and give you less control in others.
All you need is an introductory tutorial for PHP and MySQL (and perhaps something for Joomla). My recommendation is the following (start from the "end" because it's displayed in the order of newest-oldest, with the oldest being the introduction.)
http://www.php-mysql-tutorial.com
If you plan on using joomla, I'd recommend posting your questions on a joomla-related site. I can't speak for everyone here, but just because joomla is written in PHP doesn't mean it's anyone's specialty. (Personally, I dislike joomla - drupal or WP is better, IMO, but that's just personal taste.)
Another thing you might look into (for whatever CMS you choose) is if there is a plugin available that already does what you want. That's the whole idea behind a CMS, anyway. :)
wildheart25c
03-05-2012, 10:30 PM
if I may please ask a question regarding the task at hand. He wants to retrieve the content of a web page from the database. So for example, the page loads and all the text content of the page (header, footer, body, button name, etc) is retrieved from the database.
Assuming I'm not wrong in my assumption, wouldn't this affect the load on the database? the time of loading per site? If every link he goes to involves retrieving a bunch of things to fill up the page, isn't that supposed to be bad?
Once again, assuming I understood his problem :D
bmwr1200c
03-05-2012, 11:18 PM
if I may please ask a question regarding the task at hand. He wants to retrieve the content of a web page from the database. So for example, the page loads and all the text content of the page (header, footer, body, button name, etc) is retrieved from the database.
Assuming I'm not wrong in my assumption, wouldn't this affect the load on the database? the time of loading per site? If every link he goes to involves retrieving a bunch of things to fill up the page, isn't that supposed to be bad?
Once again, assuming I understood his problem :D
No you did not understand the problem. There is a web template with menus, headers they do not change. the content that needs to be displayed is in a html format and in a database. each html page has a associated audio thats also in the database. these are the only two things that will be populated in the template, rest are same for every page.
djr33
03-06-2012, 01:54 AM
Wildheart, even if all of the content of the website was generated from the database, that's not a problem. Of course the database load would be higher, but that's also what they are designed for. As an obvious example just look at the forum here-- all of the text is stored in a database and there are probably dozens of queries used in generating each page. But it works just fine. The real issue is with traffic-- if you have 1,000 visitors loading pages at the same time, that is when a database can have trouble (so you'll need to get a better server, perhaps).
The other important part is that it's not about how much text (in terms of length), at least not significantly, but rather about how many queries are required-- that's what will slow things down the most.
Powered by vBulletin® Version 4.2.2 Copyright © 2021 vBulletin Solutions, Inc. All rights reserved.