1. Check a Specific Table in a Database

# mysqlcheck -c <dbname> <tablename> -u root -p

2. Check All Tables in a Database

# mysqlcheck -c <dbname> -u root -p

3. Check All Tables and All Databases

# mysqlcheck -c  -u root -p --all-databases 

4. Analyze Tables using Mysqlcheck

# mysqlcheck -a <dbname> <tablename> -u root -p 

5. Optimize Tables using Mysqlcheck

# mysqlcheck -o <dbname> <tablename> -u root -p 

6. Repair Tables using Mysqlcheck

# mysqlcheck -r <dbname> <tablename> -u root -p 

7. Combine Check, Optimize, and Repair Tables

# mysqlcheck -u root -p --auto-repair -c -o <dbname> 

8. Check, Optimize, and Repair All Tables from All databases

# mysqlcheck -u root -p --auto-repair -c -o --all-databases 

9. Additional Useful Mysqlcheck Options

-A, –all-databases Consider all the databases
-a, –analyze Analyze tables
-1, –all-in-1 Use one query per database with tables listed in a comma separated way
–auto-repair Repair the table automatically it if is corrupted
-c, –check Check table errors
-C, –check-only-changed Check tables that are changed since last check
-g, –check-upgrade Check for version dependent changes in the tables
-B, –databases Check more than one databases
-F, –fast Check tables that are not closed properly
–fix-db-names Fix DB names
–fix-table-names Fix table names
-f, –force Continue even when there is an error
-e, –extended Perform extended check on a table. This will take a long time to execute.
-m, –medium-check Faster than extended check option, but does most checks
-o, –optimize Optimize tables
-q, –quick Faster than medium check option
-r, –repair Fix the table corruption
                   <?php 

                  $date_of_completion = '16-03-2015';

                    $skip=1;
                   
                    if((substr_count($date_of_completion,"-"))<>2){
                        $error_msg .= "<br><font color='red'>Enter the date in 'dd-mm-yyyy' format</font>";
                    }
                    else
                    {
                        $pos=strpos($date_of_completion,"-");

                   
                        //Date validation
                        $date=substr($date_of_completion,0,($pos));

                        if(($date<=0)||($date>31))
                        {
                            $msg = " Date";
                            $skip = 0;
                        }
                       

                       //Month validation
                        $month=substr($date_of_completion,($pos+1),($pos));
                           
                        if(($month<=0)||($month>12))
                        {
                            if($skip ==0){
                                $and = ' & ';
                            }
                            $msg .= "$and Month";
                            $skip = 0;
                        }

                        //Year validation
                        $year=substr($date_of_completion,($pos+4),strlen($date_of_completion));
                       
                        if(($year<=1970) || ($year>2200))
                        {
                           
                            if($skip ==0){
                                $and = ' & ';
                            }
                            $msg .= "$and Year";
                        }
                        if(!empty($msg))
                        {
                            $error_msg .= "<font color='red'>Enter a valid <b>$msg or Date format</b></font>";
                        }
                    }
                   
                   echo $error_msg;

?>
[root@achappan~]# find . -name '*.php' | wc -l



Cross-browser refers to the ability of a website, web application, HTML construct or client-side script to function in environments that provide its required features and to bow out or degrade gracefully when features are absent or lacking.

  1. Ghostlab  
  2. BrowserStack
  3. Sauce Labs
  7. Browsera
  8. Mogotest
10. Litmus
13. Spoon
string strtoupper ( string $string )

Example:

$filename=$_FILES["fileToUpload"]["name"];
$ext = substr(strrchr($filename, "."), 1);
echo "<br>File Type is: ".strtoupper($ext);

When you convert NULL into String it will always return a empty value.
<span></span> as an in-line element and a <div></div> as a block level element.


While a span allows you to separate things from the other elements around them on a page or within a document, it does not cause a line break. This is why it is perfect for in-line styling, like coloring a single word in a sentence to draw more attention to it.

But a div, by default, creates a line break because it is used to make separate containers or boxes within a page or document, hence the name division. So the proper way to use a div is as a containing element, rather than an inline styling element.

SQL Injection is possible to alters the existing SQL commands to expose hidden data or to override the valuable ones, or even to execute dangerous system level commands on the database host. This is accomplished by the application taking user input ($_GET and $_POST) and combining it with static parameters to build an SQL query.

Blog Archive

Total Pageviews

Popular Posts