Store articles in database
05-31-2006, 03:50 PM
|
Store articles in database
|
Posts: 87
|
Hi, how do I store articles in a database?
__________________
Visit AnmarTech and the AnmarTech Forums. You won't regret it. Link exchanges are welcome with sites with appropriate content.
|
|
|
|
05-31-2006, 03:57 PM
|
Re: Store articles in database
|
Posts: 14,831
Location: Blackpool. UK
|
A very broad question, and the broad answer is;
as text.
would you like to be a little more specific so we can be of more help
__________________
Chris. ->> Links are advertising NOT optimising!! <<-
Indifference will be the downfall of mankind, but who cares?
Code Samples | People Counting System
|
|
|
|
05-31-2006, 09:13 PM
|
Re: Store articles in database
|
Posts: 87
|
I mean store text articles.
__________________
Visit AnmarTech and the AnmarTech Forums. You won't regret it. Link exchanges are welcome with sites with appropriate content.
|
|
|
|
05-31-2006, 09:33 PM
|
Re: Store articles in database
|
Posts: 14,831
Location: Blackpool. UK
|
errm Yes, Guessed that much. Simply asking
Quote:
|
Hi, how do I store articles in a database?
|
means the answer is
You have some code and put them there.
only you have the questions that we may or may not be able to answer.
So we'll start a question and answer session.
Do you have any code?
Do you want some code?
Do you have a database?
Can you run server side code?
If so what?
have you bought/found/downloaded or otherwise aquired a script from somewhere?
do you want to buy a script?
do you want a script writing?
are these your own articles or are you just jumping on the latest overblown idea of having yet another articles database among the many hundreds that are around already?
__________________
Chris. ->> Links are advertising NOT optimising!! <<-
Indifference will be the downfall of mankind, but who cares?
Code Samples | People Counting System
|
|
|
|
05-31-2006, 09:44 PM
|
Re: Store articles in database
|
Posts: 87
|
I have a server, yes I have code, yes I have a database, yes I can run server side code. There are my own articles.
__________________
Visit AnmarTech and the AnmarTech Forums. You won't regret it. Link exchanges are welcome with sites with appropriate content.
|
|
|
|
06-01-2006, 05:28 AM
|
Re: Store articles in database
|
Posts: 880
Location: Leeds UK
|
I do it like thus:
tables
articles(id,type,title, summary, published, expires, active, keywords) id primary key
page(pid, aid, content) aid foreign key links to id from articles
select * from articles a left join pages p on a.id=p.aid where p.pid in (1,2,3,4,5); grabs the article and its pages.
As everytrhing is an article (including competitions if you run them) you can use the published and expirey fields (which are dates) so you can turn on or off articles based on dates without having to do anything.
Use the type to differntiate between different article types. I.E. News=>100, Features=>200 etc etc
Ibbo
Last edited by ibbo : 06-01-2006 at 05:29 AM.
|
|
|
|
06-01-2006, 10:28 PM
|
Re: Store articles in database
|
Posts: 87
|
Thanks Ibbo, I was fiddling around after I posted yesterday with my phpMyAdmin database and when I was trying to upload an article the following error came up -
SQL query:
& lt ; ! DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd" & gt;
& lt ; ? php require( "/home/arf4tvfggds/public_html/forums/SSI.php"
)
Then further on...
MySQL said:
#1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.or' at line 1
Any advise? Or a tutorial?
__________________
Visit AnmarTech and the AnmarTech Forums. You won't regret it. Link exchanges are welcome with sites with appropriate content.
Last edited by agent14 : 06-03-2006 at 05:01 PM.
|
|
|
|
06-02-2006, 03:26 AM
|
Re: Store articles in database
|
Posts: 14,831
Location: Blackpool. UK
|
Ok We have established that you have PHP and MySQL
The simplest way then is to download a PHP CMS script, lots of them at http://www.hotscripts.com/PHP/Script...nt_Management/
and install that on your site.
__________________
Chris. ->> Links are advertising NOT optimising!! <<-
Indifference will be the downfall of mankind, but who cares?
Code Samples | People Counting System
|
|
|
|
06-02-2006, 09:15 AM
|
Re: Store articles in database
|
Posts: 87
|
Okay thanks I'll try it out.
__________________
Visit AnmarTech and the AnmarTech Forums. You won't regret it. Link exchanges are welcome with sites with appropriate content.
|
|
|
|
06-02-2006, 10:02 AM
|
Re: Store articles in database
|
Posts: 87
|
Could you check out http://anmartech.com I'm trying to use the database so that the articles can be read(the site isn't complete yet as you can see). I also want users to be able to search for articles, using the title, content and date. And I also want to be able to show the top most read articles, for example 5. My web hosts has content management systems which I opted not to use, Drupal, Geeklog, Joomla, Mambo Open Source, PHP-Nuke, phpWCMS, phpWebSite, Post-Nuke, TYPO3 and XOOPS.
__________________
Visit AnmarTech and the AnmarTech Forums. You won't regret it. Link exchanges are welcome with sites with appropriate content.
Last edited by agent14 : 06-02-2006 at 10:10 AM.
|
|
|
|
06-02-2006, 08:51 PM
|
Re: Store articles in database
|
Posts: 87
|
No help...
__________________
Visit AnmarTech and the AnmarTech Forums. You won't regret it. Link exchanges are welcome with sites with appropriate content.
|
|
|
|
06-02-2006, 11:56 PM
|
Re: Store articles in database
|
Posts: 2,337
Name: Keith Marshall
Location: West Hartford, CT
|
Everytime I view this thread, I'm always greeted with a Login diolog box.
cPanel for ip 70.98.54.10
__________________
<mgraphic /> - I don't have a solution but I admire the problem.
|
|
|
|
06-03-2006, 01:01 AM
|
Re: Store articles in database
|
Posts: 8,923
Name: Steven Bradley
Location: Boulder, Colorado
|
I think I fixed the cPanel thing. I'm not seeing it anymore now. If anyone still is please let me know. Thanks.
|
|
|
|
06-03-2006, 09:29 AM
|
Re: Store articles in database
|
Posts: 87
|
__________________
Visit AnmarTech and the AnmarTech Forums. You won't regret it. Link exchanges are welcome with sites with appropriate content.
|
|
|
|
06-03-2006, 12:13 PM
|
Re: Store articles in database
|
Posts: 14,831
Location: Blackpool. UK
|
when you posted the error message, you also posted a button image which the forum tried to show.
__________________
Chris. ->> Links are advertising NOT optimising!! <<-
Indifference will be the downfall of mankind, but who cares?
Code Samples | People Counting System
|
|
|
|
06-03-2006, 03:39 PM
|
Re: Store articles in database
|
Posts: 8,923
Name: Steven Bradley
Location: Boulder, Colorado
|
Just a little extra stuff there with the copy and paste. I edited your post and removed the extras that were causing the problem.
|
|
|
|
06-03-2006, 05:01 PM
|
Re: Store articles in database
|
Posts: 87
|
Ok thanks.
__________________
Visit AnmarTech and the AnmarTech Forums. You won't regret it. Link exchanges are welcome with sites with appropriate content.
|
|
|
|
06-09-2006, 11:11 AM
|
Re: Store articles in database
|
Posts: 880
Location: Leeds UK
|
Quote:
|
Originally Posted by chrishirst
when you posted the error message, you also posted a button image which the forum tried to show.
|
Did no one exploit it?
Bit slow there guys, well caught mods.
|
|
|
|
06-09-2006, 10:50 PM
|
Re: Store articles in database
|
|
| |