Thursday, 25 August 2016

How to know the number of tables in a db schema

 SELECT COUNT(*) FROM information_schema.tables WHERE table_schema = 'testSchema';
     Here "testSchema" is the schema name.

How to wait the ajax submission ,upto response not prepared.

The below is the code snipset.

$.ajax({
        url: $(this).attr('href'),
        type: 'GET',
        async: false,
        cache: false,
        timeout: 30000,

From above "async: false" is required to wait the response.

How to restrict form submission in jquery(Bassically when AJAX form submisssion)

  $("#emailAttach").unbind('submit');

   Here "emailAttach" is form name.
In ajax form submission ,if any javascript validation is there and want to return as false then unbind the form because ,after return false also the next line is execute in ajax form submission.

How to create batch file

 @echo off
java -cp "./image/AppProfileNov11.gif;Test.jar" com.ckt.SampleProgram
pause



Explanation:

   The above 3 line create batch file where ;                     |
  ./image/AppProfileNov11.gif : Image to add in the program.(optional, as per requirment)
  Test.jar : The application jar file name.                        |
  com.ckt.SampleProgram :  class name including package name.|


How to know the Mysql version

 SHOW VARIABLES LIKE  '%version%' ;
 SHOW VARIABLES LIKE  '%engine%' ; 

How to know my MySql port number

SHOW VARIABLES WHERE Variable_name = 'port'