jQuery的
$('#speichern').live('click' , function () {
// [a] var data_save = $('#form_rechn').serializeArray();
var data_save_ser = $('#form_rechn').serialize(); //[b]
// [a] data_save[data_save.length] = {"name":"action","value":"save" },{"name":"total","value": Number($('#grandTotal').text().replace(/EUR/g, ""))};
var addintional = 'action=save&mysql=update' + '&' + 'total=' + Number($('#grandTotal').text().replace(/EUR/g, ""));//[b]
var data_save = data_save_ser + '&' + addintional;//[b]
$.ajax({
type : "POST",
cache : false,
url : 'invoice_new_action.php',
data : data_save,
error:function (xhr, ajaxOptions, thrownError){
alert(xhr.status);
alert(thrownError);
},
success : function(data) {
$.fancybox(data);
}
});
});
Run Code Online (Sandbox Code Playgroud)
[b] -part效果很好; 但是,为什么不能[a] -part工作?这不是推动:
,{"name":"total","value": [..]
php输出通过print_r($ _POST) …
是否可以:selector在jQuery中使用以下内容?
$('.galler_attr').bind('click', function() {
$(this:first-child).css('color', 'red');
});
Run Code Online (Sandbox Code Playgroud) 如何在更新的表上使用多个连接更新SQL Server上的表?在MySQL中,您可以为更新的表定义别名,但它如何与TSQL一起使用.
UPDATE recert.ou --#1-- In MSSQL/TSQL no alias allowed
SET parent_id = o2.ID
FROM recert.ou as O
JOIN recert.country C ON C.ID = O.country_id
JOIN recert.ou P ON O.parent_id = P.ID and p.country_id <> O.country_id
JOIN recert.ou o2 on o2.name = p.name and c.ID = o2.country_id
JOIN recert.country as c2 on c2.ID = o2.country_id
WHERE O.ID = o2.ID
Run Code Online (Sandbox Code Playgroud)
-
RESULT: *The table 'o' is ambiguous.*
Run Code Online (Sandbox Code Playgroud)