UPDATE table_name SET field = replace(field, 'string-to-find', 'string-that-will-replace-it');
Sunday, December 16, 2018
Replace string in Field Value with SQL
Replace string value in MySQL
Labels:
sql
Cek Double Entri Field with SQL
Cek Double Entry
SELECT field_name, COUNT(*) c FROM table_name GROUP BY field_name HAVING c > 1
Labels:
sql
Friday, November 16, 2018
Memaksa Checkbox mempunyai nilai
Memaksa Checkbox mempunyai nilai, baik yang diselect maupun tidak. Yg diselect bernilai 1 dan yang tidak bernilai 0
$("#form1").submit(function () { var this_master = $(this); this_master.find('input[type="checkbox"]').each( function () { var checkbox_this = $(this); if( checkbox_this.is(":checked") == true ) { checkbox_this.attr('value','1'); } else { checkbox_this.prop('checked',true); //DONT' ITS JUST CHECK THE CHECKBOX TO SUBMIT FORM DATA checkbox_this.attr('value','0'); } }) })
Subscribe to:
Posts (Atom)