Most Popular
Disable/enable a form element using jQuery?
There are two ways to disable/enable form elements. Set the 'disabled' attribute to true or false: // Disable #x $('#x').attr('disabled', true); // Enable #x $('#x').attr('disabled', false); Add or remove the 'disabled' attribute: // Disable #x $("#x").attr('disabled', 'disabled'); // Enable #x $("#x").removeAttr('disabled');
How to get table count for all tables in a database in Mysql?
Following Example shows you how to get tables list from database using PHP CODE. <?php $dbname = 'mysql_dbname'; if (!mysql_connect('localhost', 'root', '')) { echo 'Could not connect to mysql'; exit; } $sql = "SHOW TABLES FROM $dbname";$result = mysql_query($sql); if (!$result) { echo "DB Error, could not list tables\n"; echo 'MySQL Error: ' . mysql_error(); exit; } while ($row = mysql_fetch_row($result)) { echo "Table: $row[0] \n"; } mysql_free_result($result);?>