user.setGroup( GroupDAO.getGroupById(groupId) );
public class User {
.......
@ManyToOne
@JoinColumn(name="group_id")
Group group;
.......
@Basic
@Column(name= "group_id")
long groupId;
}
SELECT * FROM table_name t1 WHERE t1.id = $var1 AND t1.id1 = t1.id2
SELECT * FROM table_name t1 WHERE t1.id = $var1 AND t1.id1 = t1.id2 AND t1.id != t1.id2
function callMe(name:String):String
{
return "busy signal";
}
ExternalInterface.addCallback("myFunction", callMe);
<script language="JavaScript">
// callResult gets the value "busy signal"
var callResult = flashObject.myFunction("my name");
</script>
...
<object id="flashObject"...>
...
<embed name="flashObject".../>
</object>
var request:URLRequest = new URLRequest("http://URL");
navigateToURL(request, "_blank");
UPDATE field_data_field_images fi SET fi.field_images_alt = (SELECT title FROM commerce_product cp WHERE cp.product_id = fi.entity_id) , fi.field_images_title = (SELECT title FROM commerce_product cp WHERE cp.product_id = fi.entity_id) WHERE fi.field_images_alt = null AND fi.field_images_title = null;
$w = imagesx($image);
$h = imagesy($image);
$colors = array();
for ($x = 0; $x <= $w; $x++) {
$colors[$x] = array();
for ($y = 0;$y <= $h; $y++ ) {
$color = imagecolorat($img, $x, $y);
$red = ($rgb >> 16) & 0xFF;
$green = ($rgb >> 8) & 0xFF;
$blue = $rgb & 0xFF;
$colors[$x][$y] = $color;
}
}