Programming Tools
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
 
User Name:
Password:
Remember me
 
Go Back   Dev Articles Community ForumsProgrammingProgramming Tools

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Display Modes
 
Unread Dev Articles Community Forums Sponsor:
  #1  
Old December 29th, 2002, 09:14 PM
mytch mytch is offline
Dev Articles Novice (500 - 999 posts)
 
Join Date: Apr 2002
Location: Sydney, Australia
Posts: 589 mytch User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 7
Article Discussion: Building a Threaded News System With PHP

Building a Threaded News System With PHP If you have any questions or comments about this article then please post them here.

You can read the article here .

Reply With Quote
  #2  
Old February 5th, 2003, 07:01 PM
zigote zigote is offline
Contributing User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Aug 2002
Location: Atlanta GA
Posts: 73 zigote User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 1 h 55 m 11 sec
Reputation Power: 7
Regarding Building a Threaded News System With PHP
http://www.devarticles.com/art/1/303/2

A few of the tables that where listed to be created are using the type, INTEGER

Is this the same as INT in MySQL

Reply With Quote
  #3  
Old February 9th, 2003, 12:06 PM
FrankieShakes FrankieShakes is offline
Frank The Tank!
Dev Articles Beginner (1000 - 1499 posts)
 
Join Date: Jun 2002
Location: Toronto, Canada
Posts: 1,246 FrankieShakes User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 8
Send a message via ICQ to FrankieShakes Send a message via MSN to FrankieShakes
zigote,

Yeah... The two are used interchangeably...
__________________
____________________________________________
Developer Shed Weekly Writer | DevArticles Forum Moderator
Build Your Own KlipFolio Klip With PHP
FrankManno.com - Under Construction
Design Interactive Group - Under Construction

Reply With Quote
  #4  
Old February 9th, 2003, 11:23 PM
zigote zigote is offline
Contributing User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Aug 2002
Location: Atlanta GA
Posts: 73 zigote User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 1 h 55 m 11 sec
Reputation Power: 7
thanks, I have used INT, but I didn't know if it was correct or not..


thanks again

Reply With Quote
  #5  
Old February 24th, 2003, 10:03 AM
EJViper EJViper is offline
Registered User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Feb 2003
Location: Caracas, Venezuela
Posts: 17 EJViper User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Send a message via AIM to EJViper
in the db_connect.php file says:

require_once 'DB.php';

But i dont have that file, in the tutorial, i didnt find where or how to get it.

Reply With Quote
  #6  
Old March 19th, 2003, 09:01 AM
ek5932 ek5932 is offline
Junior Member
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Mar 2003
Posts: 1 ek5932 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
i have the same problem whats up with it?

Reply With Quote
  #7  
Old March 19th, 2003, 12:51 PM
zigote zigote is offline
Contributing User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Aug 2002
Location: Atlanta GA
Posts: 73 zigote User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 1 h 55 m 11 sec
Reputation Power: 7
From what I see, you will need access to a PHP build which includes PEAR.

Here's a tutorial on using PEAR:B.
http://www.evolt.org/article/Abstra...AR_DB/17/21927/

Last edited by zigote : March 20th, 2003 at 04:20 PM.

Reply With Quote
  #8  
Old August 11th, 2003, 02:17 AM
purplebz purplebz is offline
Junior Member
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Jan 2003
Posts: 3 purplebz User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Quote:
// if form has been submitted
if(isset($_POST['submit'])) {
...
...
...
// insert into database
$insert = $db->query("INSERT INTO news (author, title, announcement)
VALUES ('".addslashes($_POST['author'])."',
'".addslashes($_POST['title'])."',
'".addslashes($_POST['announcement'])."')");
echo '<p>Cheers '.$_POST['author'].', your announcement has been added, click
<a href="/index.php">here</a> to view it.</p>';
}


I would like to ask how if the user submitted the form twice? How can you validate on posting twice?
Thank you.

Reply With Quote
  #9  
Old February 11th, 2004, 04:33 PM
leblam1 leblam1 is offline
Registered User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Feb 2004
Posts: 1 leblam1 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Why

what is up with this?
require_once 'DB.php';
and what doest this?
Firstly, the news table:

id INTEGER (11) auto_increment,
author VARCHAR (40),
title VARCHAR (40),
announcement TEXT,
PRIMARY KEY(id)

Now the comments table:

id INTEGER (11) auto_increment,
news_id INTEGER (11),
rel_id INTEGER (11),
replies INTEGER (11),
author VARCHAR (40),
title VARCHAR (40),
comment TEXT,
PRIMARY KEY (id)

Reply With Quote
  #10  
Old February 12th, 2004, 03:52 PM
zigote zigote is offline
Contributing User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Aug 2002
Location: Atlanta GA
Posts: 73 zigote User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 1 h 55 m 11 sec
Reputation Power: 7
leblam1, far as I know require_once 'DB.php';
is using PEAR for the database functions.

Tutorial about PEAR
http://www.evolt.org/article/Abstra...AR_DB/17/21927/

Also those tables you listed go into a mysql database
example:
PHP Code:
 CREATE TABLE `news` (
  `
idint(11NOT NULL auto_increment,
  `
authorvarchar(40NOT NULL default '',
  `
titlevarchar(40NOT NULL default '',
  `
announcementtext NOT NULL,
  
PRIMARY KEY  (`id`)
TYPE=MyISAM ;

CREATE TABLE `comments` (
  `
idint(11NOT NULL auto_increment,
  `
news_idint(11NOT NULL default '0',
  `
rel_idint(11NOT NULL default '0',
  `
repliesint(11NOT NULL default '0',
  `
authorvarchar(40NOT NULL default '',
  `
titlevarchar(40NOT NULL default '',
  `
commenttext NOT NULL,
  
PRIMARY KEY  (`id`)
TYPE=MyISAM 

Reply With Quote
Reply

Viewing: Dev Articles Community ForumsProgrammingProgramming Tools > Article Discussion: Building a Threaded News System With PHP


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


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
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 1 hosted by Hostway
Stay green...Green IT