Re: Proper way to query a db?

From: Date: Mon, 19 Jun 2000 14:45:37 +0000
Subject: Re: Proper way to query a db?
References: 1  Groups: php.db 
Request: Send a blank email to php-db+get-479@lists.php.net to get a copy of this message
"Jay Proulx" <jayproulx@sympatico.ca> wrote in message news:002801bfba1b$1ca4a9e0$010044c0@jayproul... I'm pretty new to this, so be gentle ;) (not with the code, just with flames ;) I'm just trying to make a dynamically updatable news page for my website, heres basically what I am trying to do, yeah, I know this is all wrong.. <?php $conn = pg_Connect("dbname=database port=1234"); $query = "INSERT INTO news (varOne, varTwo, varThree) VALUES ($varOne, $varTwo, $varThree);"; /* this is submitted from a form */ pg_Exec($conn, $query); $query = "SELECT * FROM news WHERE varOne > 0"; /* varOne being an index */ pg_Exec($conn, $query); while ($varOne > 0; $varOne++) { echo ("formatted output"); }; pg_Close(); ?> Thanks in advance for the help.. Jay - jayproulx@sympatico.ca - http://digitalAnomaly.slf.cx

« previous php.db (#479) next »