note 47442 added to ref.sqlite

From: Date: Tue, 16 Nov 2004 15:24:48 +0000
Subject: note 47442 added to ref.sqlite
Groups: php.notes 
Request: Send a blank email to php-notes+get-80600@lists.php.net to get a copy of this message
The same in 3 lines. <?php function sqlite_table_exists($db,$mytable) { /* counts the tables that match the name given */ $result = sqlite_query($db,"SELECT COUNT(*) FROM sqlite_master WHERE type='table' AND name='$mytable'"); /* casts into integer */ $count = intval(sqlite_fetch_single($result)); /* returns true or false */ return $count > 0; } ?> ---- Manual Page -- http://www.php.net/manual/en/ref.sqlite.php Edit -- http://master.php.net/manage/user-notes.php?action=edit+47442 Delete -- http://master.php.net/manage/user-notes.php?action=delete+47442&report=yes Reason: bad code -- http://master.php.net/manage/user-notes.php?action=delete+47442&report=yes&reason=bad+code Reason: spam -- http://master.php.net/manage/user-notes.php?action=delete+47442&report=yes&reason=spam Reason: useless example -- http://master.php.net/manage/user-notes.php?action=delete+47442&report=yes&reason=useless+example Reason: contains commercial links -- http://master.php.net/manage/user-notes.php?action=delete+47442&report=yes&reason=contains+commercial+links Reason: useless note -- http://master.php.net/manage/user-notes.php?action=delete+47442&report=yes&reason=useless+note Reject -- http://master.php.net/manage/user-notes.php?action=reject+47442&report=yes Search -- http://master.php.net/manage/user-notes.php

« previous php.notes (#80600) next »