Received: from smtp6.mindspring.com (smtp6.mindspring.com [207.69.200.110]) by postgresql.org (8.11.3/8.11.1) with ESMTP id f43EDWA59769 for ; Thu, 3 May 2001 10:13:32 -0400 (EDT) (envelope-from gee308@mediaone.net) Received: from comm2.tcgfinancial.net (user-2ive29a.dialup.mindspring.com [165.247.9.42]) by smtp6.mindspring.com (8.9.3/8.8.5) with ESMTP id KAA17114; Thu, 3 May 2001 10:13:27 -0400 (EDT) Received: from mediaone.net (IDENT:root@comm2 [127.0.0.1]) by comm2.tcgfinancial.net (8.9.3/8.9.3) with ESMTP id KAA21820; Thu, 3 May 2001 10:06:10 -0400 Message-ID: <3AF165D1.D9F6420E@mediaone.net> Date: Thu, 03 May 2001 10:06:10 -0400 From: Jason X-Mailer: Mozilla 4.72 [en] (X11; U; Linux 2.2.14-5.0 i686) X-Accept-Language: en MIME-Version: 1.0 To: Adam Lang CC: pgsql-php@postgresql.org Subject: 2 more questions(Was: Re: psql with PHP question) References: <3AF1427C.B4E85A45@is3-design.com> <3AF149C1.AEC30AA9@mediaone.net> <008b01c0d3d1$bfe11a00$330a0a0a@rutgersinsurance.com> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Archive-Number: 200105/12 X-Sequence-Number: 321 Thanks for the help, sorry for cross posting. I have 2 more questions. I am a newb with psql and PHP. I am creating a slashdot like site. First, what is the best way to store an article? Inside psql or just reference the path inside psql or is there another method? I am currently using the path inside psql then use readfile() from PHP to display the file. Second, Can you guys with experience tell me where I am writing code improperly or give some tips? This short code segment just displays the article and comments posted with it. Thanks: "; echo $arr["description"] ."


"; echo $arr["path"]."
"; //this line is just for seign if the path is set correctly readfile($arr["path"]); // echo $arr["path"]; //next 3 lines are jut for replying to the article echo "
"; echo "
"; echo "



"; //start the comments section here $q3 = pg_Exec($conn, "select cid from comment where article='$sid'"); $maxid = pg_numrows($q3); $q2 = pg_Exec($conn,"select uname,time,date,post,ctitle,cid from comment where article=$sid"); if(!empty($maxid)){ for($i=0;$i<$maxid;$i++){ $arr2 = pg_fetch_array($q2, $i); echo "By ". $arr2["uname"] .": ". $arr2["ctitle"] ."
"; echo $arr2["post"] ."
"; echo "Reply to this

"; } } } } include("/usr/local/apache/phpinc/footer"); ?>