PHP Classes

File: EntityGenerator/assets/js/getTablesByDatabase.js

Recommend this page to a friend!
  Classes of Channaveer Hakari   Entity Generator   EntityGenerator/assets/js/getTablesByDatabase.js   Download  
File: EntityGenerator/assets/js/getTablesByDatabase.js
Role: Auxiliary data
Content type: text/plain
Description: Auxiliary data
Class: Entity Generator
Generate database table access classes
Author: By
Last change:
Date: 5 years ago
Size: 852 bytes


Class file image Download
$('#database').on('change',function(){ var databaseName = $(this).val(); $('.tableLoading').html('Loading...'); if(databaseName != '' || databaseName != undefined){ $.ajax({ 'url' : 'getTables.php', 'type' : 'POST', 'dataType' : 'JSON', 'data' : {databaseName:databaseName}, 'success' : function(retObj){ if(retObj.tables != ''){ $('#tables').html(''); $(retObj.tables).each(function(key,value){ var tableName = value.tableName; $('#tables').append('<option value="'+tableName+'">'+tableName+'</option>'); $('#tables')[0].sumo.reload(); }); $('.tableLoading').html(''); }else{ $('#tables').html(''); $('.tableLoading').html(''); $('#tables')[0].sumo.reload(); alert('No tables found.'); } } }); }else{ alert('Please select proper database'); } });