Let say you have a table called students with two fields fname and age.
insert into students (fname, age) values
('Kusal', '26'),
('Tom', '18'),
('Ann', '23')
Remember to give the column names in the query.
insert into students (fname, age) values
('Kusal', '26'),
('Tom', '18'),
('Ann', '23')
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>How to add table rows using jQuery</title>
<style>
.thumb{vertical-align:top; padding:2px; border:1px #CCC solid;}
</style>
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js"></script>
<script>
$(document).ready(function(){
$(".image").click(function() {
//$('#main').hide();
var image = $(this).attr("href");
$('#main').attr("src", image);
$('#main').load(function() {
$('#main').fadeIn('slow');
});
return false;
});
});
</script>
</head>
<body>
<a href="images/image1.jpg" class="image"><img alt="Image1" src="thumb/image1.jpg" class="thumb" border="0"/></a>
<a href="images/image2.jpg" class="image"><img alt="Image2" src="thumb/image2.jpg" class="thumb" border="0"/></a>
<a href="images/image3.jpg" class="image"><img alt="Image3" src="thumb/image3.jpg" class="thumb" border="0"/></a>
<a href="images/image4.jpg" class="image"><img alt="Image4" src="thumb/image4.jpg" class="thumb" border="0"/></a>
<div id="container" style="height:400px; padding-top:20px;"><img id="main" src="images/image1.jpg" /></div>
</body>
</html>
$('#image').hide();
$('#image').attr("src", image); //next image path
//still in hide
$('#image').load(function() {
$('#image').fadeIn('slow');
});
<script type="text/javascript">
var number = 100.58;
number = Math.round(number);
alert(number); //101
</script>
<script type="text/javascript">
var number = 100.58;
number = Math.round(number*10)/10;
alert(number); //100.6
</script>
<a href="#" onClick="history.go(-1)">Back</a>
<input type=button value="Back" onClick="history.go(-1)">
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>How to add table rows using jQuery</title>
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js"></script>
<script>
$(document).ready(function(){
$('#add').click(function(){
$('#my_tbl tr:last').after('<tr><td> </td><td> </td></tr>');
});
});
</script>
</head>
<body>
<table id="my_tbl" border="1" cellpadding="1" cellspacing="1">
<tr>
<td> Head1 </td>
<td> Head2 </td>
</tr>
</table>
<br />
<input type="button" id="add" value="Add Row" />
</body>
</html>
$result = mysql_query("select count(id) from table");
$data = mysql_fetch_array($result);
$all_rows = $data[0];
$result = mysql_query("select id from table");
$all_rows = mysql_num_rows($result);
<html>
<head>
<title>Video thumb rotator with jquery Cycle Plugin</title>
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js"></script>
<script type="text/javascript" src="jquery.cycle.min.js"></script>
<script type="text/javascript">
$(document).ready(function() {
$('.adimagebg').cycle();
$('.adimagebg').cycle('pause');
$(".adimagebg").hover( function () {
$(this).cycle({
fx: 'fade',
speed: 300,
timeout: 1200
});
},
function(){
$(this).cycle('pause');
});
});
</script>
</head>
<body>
<div class="adimagebg">
<a href="#"><img width="100" src="image1.jpg" border="0" /></a>
<a href="#"><img width="100" src="image2.jpg" border="0" /></a>
<a href="#"><img width="100" src="image3.jpg" border="0" /></a>
</div>
</body>
</html>
$query = $yt->newVideoQuery();
$query->setOrderBy('updated');
$query->setSafeSearch('none');
$query->setVideoQuery('Test');
$query->setAuthor('GoogleDevelopers');
$query->setMaxResults(10);
$query->setStartIndex(1);
$videoFeed = $yt->getVideoFeed($query->getQueryUrl(2));
$all_results = $videoFeed->getTotalResults()->text;
$videoEntry = $yt->getVideoEntry($id, null, true);
$entry = $yt->getFullVideoEntry($id);
require_once 'Zend/Loader.php';
Zend_Loader::loadClass('Zend_Gdata_YouTube');
$yt = new Zend_Gdata_YouTube();
Zend_Loader::loadClass('Zend_Gdata_AuthSub');
Zend_Loader::loadClass('Zend_Gdata_ClientLogin');
Zend_Loader::loadClass('Zend_Uri_Http');
$('.clsname').click(function(){
var idval = this.title;
});
$('.clsname').click(function(){
var idval = this.id;
});