CDN Link for All Jquery Ui Themes


 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
<!-- CDN COPIES OF STANDARD JQUERY THEMES (all of these are available in v1.8.16) -->
<!-- <link href="http://ajax.googleapis.com/ajax/libs/jqueryui/1/themes/base/jquery-ui.css" type="text/css" rel="stylesheet" /> -->
<!-- <link href="http://ajax.googleapis.com/ajax/libs/jqueryui/1/themes/black-tie/jquery-ui.css" type="text/css" rel="stylesheet" /> -->
<!-- <link href="http://ajax.googleapis.com/ajax/libs/jqueryui/1/themes/blitzer/jquery-ui.css" type="text/css" rel="stylesheet" /> -->
<!-- <link href="http://ajax.googleapis.com/ajax/libs/jqueryui/1/themes/cupertino/jquery-ui.css" type="text/css" rel="stylesheet" /> -->

<!-- <link href="http://ajax.googleapis.com/ajax/libs/jqueryui/1/themes/dark-hive/jquery-ui.css" type="text/css" rel="stylesheet" /> -->
<!-- <link href="http://ajax.googleapis.com/ajax/libs/jqueryui/1/themes/dot-luv/jquery-ui.css" type="text/css" rel="stylesheet" /> -->
<!-- <link href="http://ajax.googleapis.com/ajax/libs/jqueryui/1/themes/eggplant/jquery-ui.css" type="text/css" rel="stylesheet" /> -->
<!-- <link href="http://ajax.googleapis.com/ajax/libs/jqueryui/1/themes/excite-bike/jquery-ui.css" type="text/css" rel="stylesheet" /> -->
<!-- <link href="http://ajax.googleapis.com/ajax/libs/jqueryui/1/themes/flick/jquery-ui.css" type="text/css" rel="stylesheet" /> -->
<!-- <link href="http://ajax.googleapis.com/ajax/libs/jqueryui/1/themes/hot-sneaks/jquery-ui.css" type="text/css" rel="stylesheet" /> -->
<!-- <link href="http://ajax.googleapis.com/ajax/libs/jqueryui/1/themes/humanity/jquery-ui.css" type="text/css" rel="stylesheet" /> -->
<!-- <link href="http://ajax.googleapis.com/ajax/libs/jqueryui/1/themes/le-frog/jquery-ui.css" type="text/css" rel="stylesheet" /> -->
<!-- <link href="http://ajax.googleapis.com/ajax/libs/jqueryui/1/themes/mint-choc/jquery-ui.css" type="text/css" rel="stylesheet" /> -->

<!-- <link href="http://ajax.googleapis.com/ajax/libs/jqueryui/1/themes/overcast/jquery-ui.css" type="text/css" rel="stylesheet" /> -->
<!-- <link href="http://ajax.googleapis.com/ajax/libs/jqueryui/1/themes/pepper-grinder/jquery-ui.css" type="text/css" rel="stylesheet" /> -->
<!-- <link href="http://ajax.googleapis.com/ajax/libs/jqueryui/1/themes/redmond/jquery-ui.css" type="text/css" rel="stylesheet" /> -->
<link href="http://ajax.googleapis.com/ajax/libs/jqueryui/1/themes/smoothness/jquery-ui.css" type="text/css" rel="stylesheet" />
<!-- <link href="http://ajax.googleapis.com/ajax/libs/jqueryui/1/themes/south-street/jquery-ui.css" type="text/css" rel="stylesheet" /> -->
<!-- <link href="http://ajax.googleapis.com/ajax/libs/jqueryui/1/themes/start/jquery-ui.css" type="text/css" rel="stylesheet" /> -->
<!-- <link href="http://ajax.googleapis.com/ajax/libs/jqueryui/1/themes/sunny/jquery-ui.css" type="text/css" rel="stylesheet" /> -->
<!-- <link href="http://ajax.googleapis.com/ajax/libs/jqueryui/1/themes/swanky-purse/jquery-ui.css" type="text/css" rel="stylesheet" /> -->
<!-- <link href="http://ajax.googleapis.com/ajax/libs/jqueryui/1/themes/trontastic/jquery-ui.css" type="text/css" rel="stylesheet" /> -->

<!-- <link href="http://ajax.googleapis.com/ajax/libs/jqueryui/1/themes/ui-darkness/jquery-ui.css" type="text/css" rel="stylesheet" /> -->
<!-- <link href="http://ajax.googleapis.com/ajax/libs/jqueryui/1/themes/ui-lightness/jquery-ui.css" type="text/css" rel="stylesheet" /> -->
<!-- <link href="http://ajax.googleapis.com/ajax/libs/jqueryui/1/themes/vader/jquery-ui.css" type="text/css" rel="stylesheet" /> -->

Mysql Stored Procedures

Beginning MySql Stored Procedure

A database stored program—sometimes called a stored module or a stored routine—is
a computer program (a series of instructions associated with a name) that is stored within, and executes within, the database server. The source code and (sometimes) any compiled version of the stored program are almost always held within the database server’s system tables as well. When the program is executed, it is executed within the memory address of a database server process or thread.

There are three major types of MySQL stored programs:
Stored procedures
Stored procedures are the most common type of stored program. A stored procedure is a generic program unit that is executed on request and that can accept multiple input and output parameters.
Stored functions
Stored functions are similar to stored procedures, but their execution results in
the return of a single value. Most importantly, a stored function can be used
within a standard SQL statement, allowing the programmer to effectively extend
the capabilities of the SQL language.
Triggers
Triggers are stored programs that are activated in response to, or are triggered
by, an activity within the database. Typically, a trigger will be invoked in
response to a DML operation (INSERT, UPDATE, DELETE) against a database table.
Triggers can be used for data validation or for the automation of denormalization.

Simple Example of Stored Procedure


 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
BEGIN
DECLARE l_book_count INTEGER;
 SELECT COUNT(*) INTO l_book_count
FROM books
WHERE author LIKE '%XYZ%';
SELECT CONCAT('XYZ has written (or co-written) ',
l_book_count ,
' books.');

UPDATE books
SET author = REPLACE (author, 'XYZ', 'Zeenux')
WHERE author LIKE '%XYZ%';
END

Jquery Datatables + Table using Mysql

<script type='text/javascript' src='https://code.jquery.com/jquery-2.1.4.min.js'></script>
<Script type="text/javascript" src='//cdn.datatables.net/1.10.7/js/jquery.dataTables.min.js'>
</script>

<link rel='stylesheet' href='//cdn.datatables.net/1.10.7/css/jquery.dataTables.min.css' />

<script src='//cdn.datatables.net/plug-ins/1.10.7/integration/jqueryui/dataTables.jqueryui.js'></script>
    <link rel='stylesheet' href='http://ajax.googleapis.com/ajax/libs/jqueryui/1.10.2/themes/cupertino/jquery-ui.css' />
    <link rel='stylesheet' href='//cdn.datatables.net/plug-ins/1.10.7/integration/jqueryui/dataTables.jqueryui.css' />

<style>

body { font-size: 140%; }
</style>

  
<script>

  

$(document).ready(function() {
    $('#example').dataTable( {
        //"processing": true,
        //"serverSide": true,
        //"ajax": "jsonencode.php"
    } );
} );

</script>

</head>



</head>
<body>
<table id="example" class="display" cellspacing="0" width="100%">
        <thead>
            <tr>
                <th>ID</th>
                <th>Vehcile ID</th>
                <th>KM Driven</th>
                <th>Date of Reading</th>
                <th>Date of Entry</th>
                <th>Entry User</th>
            </tr>
        </thead>
<script type='text/javascript' src='https://code.jquery.com/jquery-2.1.4.min.js'></script>
<Script type="text/javascript" src='//cdn.datatables.net/1.10.7/js/jquery.dataTables.min.js'>
</script>

<link rel='stylesheet' href='//cdn.datatables.net/1.10.7/css/jquery.dataTables.min.css' />

<script src='//cdn.datatables.net/plug-ins/1.10.7/integration/jqueryui/dataTables.jqueryui.js'></script>
    <link rel='stylesheet' href='http://ajax.googleapis.com/ajax/libs/jqueryui/1.10.2/themes/cupertino/jquery-ui.css' />
    <link rel='stylesheet' href='//cdn.datatables.net/plug-ins/1.10.7/integration/jqueryui/dataTables.jqueryui.css' />

<style>

body { font-size: 140%; }
</style>

   
<script>

   

$(document).ready(function() {
    $('#example').dataTable( {
     
    } );
} );

</script>

</head>



</head>
<body>
<table id="example" class="display" cellspacing="0" width="100%">
        <thead>
            <tr>
                <th>ID</th>
                <th>Vehcile ID</th>
                <th>KM Driven</th>
                <th>Date of Reading</th>
                <th>Date of Entry</th>
                <th>Entry User</th>
            </tr>
        </thead>
 <?php
$db = new mysqli('localhost', 'user', 'password', 'database');

if($db->connect_errno > 0){
    die('Unable to connect to database [' . $db->connect_error . ']');
}

$sql="select * from tbl_readings";

if(!$result = $db->query($sql)){
    die('There was an error running the query [' . $db->error . ']');
}
$json = array( );

while( $row = $result->fetch_assoc() ) {
   echo "<tr>";
   echo "<td> ".$row['id']."</td>";
   echo "<td> ".$row['vehicle_id']."</td>";
   echo "<td> ".$row['km_driven']."</td>";
   echo "<td> ".$row['dt_of_reading']."</td>";
   echo "<td> ".$row['dt_of_entry']."</td>";
   echo "<td> ".$row['entry_user']."</td>";
   echo "</tr>";
}

?>
        <tfoot>
            <tr>
                                <th>ID</th>
                <th>Vehcile ID</th>
                <th>KM Driven</th>
                <th>Date of Reading</th>
                <th>Date of Entry</th>
                <th>Entry User</th>
            </tr>
        </tfoot>
    </table>
</body>
</html>
        <tfoot>
            <tr>
                                <th>ID</th>
                <th>Vehcile ID</th>
                <th>KM Driven</th>
                <th>Date of Reading</th>
                <th>Date of Entry</th>
                <th>Entry User</th>
            </tr>
        </tfoot>
    </table>
</body>
</html>

Running Drupal in Docker

I will assume that you have already installed docker. If you haven't installed docker please visit https://www.docker.com/ to download a...