Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
tree: 55d3702a92
Fetching contributors…

Cannot retrieve contributors at this time

66 lines (65 sloc) 1.711 kb
<html>
<head>
<script type="text/javascript" src="http://code.jquery.com/jquery-latest.pack.js"></script>
<script type="text/javascript" src="jquery.db.js"></script>
<script type="text/javascript">
$(function() {
console.debug(
$('.users')
.where('.id:eq(1)')
.select('.name')
);
console.debug(
$('.users')
.where('.name:contains(a)')
.and('.name:contains(c)')
.select('*')
);
console.debug(
$('.users')
.join('.photos')
.where('.photos.user_id:eq(.users.id)')
.and('.users.id:eq(1)')
.select('.photos.url')
);
});
</script>
</head>
<body>
<table class="users">
<tbody>
<tr>
<td class="id">1</td>
<td class="name">amy</td>
</tr>
<tr>
<td class="id">2</td>
<td class="name">bob</td>
</tr>
<tr>
<td class="id">3</td>
<td class="name">carl</td>
</tr>
</tbody>
</table>
<table class="photos">
<tbody>
<tr>
<td class="id">1</td>
<td class="user_id">1</td>
<td class="url">http://www.example.com/foo.png</td>
</tr>
<tr>
<td class="id">2</td>
<td class="user_id">2</td>
<td class="url">http://www.example.com/bar.png</td>
</tr>
<tr>
<td class="id">3</td>
<td class="user_id">3</td>
<td class="url">http://www.example.com/baz.png</td>
</tr>
</tbody>
</table>
</body>
</html>
Jump to Line
Something went wrong with that request. Please try again.