Posts

Showing posts from November, 2015

fetch data fron mysql different table connected using foreing key based on id

Image
php code <!DOCTYPE html> <html> <head> <title>Read Data From Database Using PHP - Demo Preview</title> <meta content="noindex, nofollow" name="robots"> <style> @import "http://fonts.googleapis.com/css?family=Droid+Serif"; /* Above line is to import google font style */ .maindiv { margin:0 auto; width:980px; height:500px; background:#fff; padding-top:20px; font-size:14px; font-family:'Droid Serif',serif } .title { width:100%; height:70px; text-shadow:2px 2px 2px #cfcfcf; font-size:16px; text-align:center; font-family:'Droid Serif',serif } .divA { width:70%; float:left; margin-top:30px } .form { width:400px; float:left; background-color:#fff; font-family:'Droid Serif',serif; padding-left:30px } .divB { width:100%; height:100%; background-color:#fff; border:dashed 1px #999 } .divD { width:200px; height:480px; padding:0 20px; float:left; bac

fetch data fron mysql different table connected using foreing key based on id

Image
  PHP File: readphp.php <!DOCTYPE html> < html > < head > < title > Read Data From Database Using PHP - Demo Preview </ title > < meta content = " noindex, nofollow " name = " robots " > < link href = " style.css " rel = " stylesheet " type = " text/css " > </ head > < body > < div class = " maindiv " > < div class = " divA " > < div class = " title " > < h2 > Read Data Using PHP </ h2 > </ div > < div class = " divB " > < div class = " divD " > < p > Click On Menu </ p > <?php $connection = mysql_connect ( "localhost" , "root" , "" ) ; // Establishing Connection with Server $db = mysql_select_db ( "company" , $connection ) ; // Selecting Database //MySQL Query to r

mysql select query with two value in comman column (Is it possible to query a comma separated column for a specific value?)

ID | CATEGORIES --------------- 1 | c1 2 | c2 , c3 3 | c3 , c2 4 | c3 5 | c4 , c8 , c5 , c100     SELECT id FROM table WHERE categories LIKE '%c2%'; Would return rows 2 and 3 SELECT id FROM table WHERE categories LIKE '%c3%' and categories LIKE '%c2%'; Would again get me rows 2 and 3, but not row 4 SELECT id FROM table WHERE categories LIKE '%c3%' or categories LIKE '%c2%'; Would again get me rows 2, 3, and 4           sometimes   select * from YourTable where ',' || CommaSeparatedValueColumn || ',' LIKE '%,SearchValue,%'

Bootstrap Tabs and pills

Image
Tabs are created with <ul class="nav nav-tabs">: Tip: Also mark the current page with <li class="active">. Pills are created with <ul class="nav nav-pills">. Also mark the current page with <li class="active"> <!DOCTYPE html> <html lang="en"> <head>   <title>Bootstrap Case</title>   <meta charset="utf-8">   <meta name="viewport" content="width=device-width, initial-scale=1">   <link rel="stylesheet" href="http://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/css/bootstrap.min.css">   <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.3/jquery.min.js"></script>   <script src="http://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/js/bootstrap.min.js"></script> </head> <body> <div class="container">   <h3>Centered Tabs&l