Home : General : Databases and SQL :

General: Databases and SQL: Re: [yogi] sql to check if value exists in DB: Edit Log

Here is the list of edits for this post
Re: [yogi] sql to check if value exists in DB
Why are you setting $id_exists to 1?

You could use the count or:

Code:
if ( $DB->table('Category')->select( { FatherID => $category_id }, 'ID' )->fetchrow ) {
print "found";
}

Last edited by:

Paul: May 15, 2002, 2:28 AM

Edit Log: