Home : General : Databases and SQL :

General: Databases and SQL: sql to check if value exists in DB: Edit Log

Here is the list of edits for this post
sql to check if value exists in DB
What would the code/sql to check if a value ($category_id) exists in table ('Category') under column ('FatherID')?

Code:
my $id_exists = 1; # 1 - Yes, 0-No in this case it is safer to defult to yes, as # this will be part of a delete function.

$id_exists = $DB->('Category')->select->('FatherID'==$category_id) ????


I might be way off on thisCrazy

Thanks!

Last edited by:

sooke: May 14, 2002, 11:57 PM

Edit Log: