I'll do that. When I load an article I supply the article's id.
--
JJ Harrison
[EMAIL PROTECTED]
www.tececo.com
--
Please reply on the list/newsgroup unless the reply it OT.
"Analysis & Solutions" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> Hi JJ:
>
> On
Hi JJ:
On Sun, Aug 11, 2002 at 01:44:53AM +1000, JJ Harrison wrote:
>
> Which has a save or a publish option. I only want to keep one copy of each
> article in the DB. This adds a new one each time. I know about updates in
> SQL but the file may or may not already be in the db. Does anyone have
Or, of course, a selection of fields as a unique key. The insert will fail
if there is an exisiting record with that key; you can interrogate the error
and report on the exisitence of a duplicate record.
The select/lock method is used for update purposes ('select for update' et
al.), not to keep
JJ,
> i have this code snippet:
>
> if(isset($_POST['save'])){
> $query = 'INSERT INTO article_data VALUES (\'\', '.$_SESSION['uid'].',
> '.time().', \''.$_POST['title'].'\', \''.$_POST['description'].'\',
> '.$_POST['cat'].', \''.$_POST['text'].'\', 0)';
> $result = mysql_query($query) or
i have this code snippet:
if(isset($_POST['save'])){
$query = 'INSERT INTO article_data VALUES (\'\', '.$_SESSION['uid'].',
'.time().', \''.$_POST['title'].'\', \''.$_POST['description'].'\',
'.$_POST['cat'].', \''.$_POST['text'].'\', 0)';
$result = mysql_query($query) or die("Query failed:
5 matches
Mail list logo