Question: I am working on an android app in which I am using some Native c++ code. Within the native code, I am querying the sqlite database and sending the result over to the calling function in Java. The problem is that my sqlite queries have to be dynamic depending on the value of an int variable in the native code. So basically, the query is not plain string but has to combined with the int variable before sending it to sqlite.

I need help in constructing the query.

Any help would be appreciated.

Thanks,
Abhi

Answer: 
I recently found the PERFECT solution. This does require the use of JavaScript / jQuery though. Basically, once the page is loaded, get the natural height of all of the divs. Choose the greatest natural height of each the divs. Set all of the divs to the that height. 

```
<style>

body {
    font-size: .9em;
}
#ProductWrapper {
    width: 620px;   
    float: left;
}
.ProductDiv {
    width: 200px;
    float: left;
    background: rgb(240,240,240);
    margin: 1px;
    overflow: auto;
}

```

```
<div id="ProductWrapper">
<div class="ProductDiv" data-nat-height=''>asdfasdfasdf asdfasdfasdf asdfasdfasdf asdfasdfasdf</div>
<div class="ProductDiv" data-nat-height=''>asdfasdfasdf asdfasdfasdf asdfasdfasdf asdfasdfasdf asdfasdfasdf asdfasdfasdf </div>
<div class="ProductDiv" data-nat-height=''>asdfasdfasdf asdfasdfasdf asdfasdfasdf asdfasdfasdf asdfasdfasdf asdfasdfasdf asdfasdfasdf asdfasdfasdf asdfasdfasdf asdfasdfasdf asdfasdfasdf asdfasdfasdf asdfasdfasdf asdfasdfasdf asdfasdfasdf </div>
</div>

```

```
<script type="text/javascript">
$(document).ready(function() {

// GET MAX NAT HEIGHT
var MaxHeight = 200;
$(".ProductDiv").each(function() {
    var Height = $(this).height();
    if (Height > MaxHeight) {
        MaxHeight = Height;  
    }
    $(this).attr("data-nat-height", Height);
});
// SET TO MAX HEIGHT
$(".ProductDiv").css("height", MaxHeight+"px");

});
</script>

```
Use a negative margin'hack'.

Give each column a margin-bottom of -9999 and a padding-bottom of 9999, and a height of 100%. I'm not sure if that is the right way round or not though. But the idea is that as one container expands, the others will also all expand due to the 100% height, the padding and margin work such that the margin is hidden outside the 100% height - Google for 'negative margin columns'.

Alterantivly use css-discuss to see all the industry recognised ways to build 3 column layouts, there are fluid examples - <http://css-discuss.incutio.com/wiki/Three_Column_Layouts>