Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

//open file
$("#editFormOpenBut").on('click', function(){
$.get("beet.log", function(response) {
console.log("WE DONE DID IT!");
console.log(response);
});
});
function createBlogPos() {
$.ajax({ type: "POST",
url: "/blog/editPage.php",
data: {id : "saveBut", formTitle : $("#editFormTitle").val(), formText : $("#editFormText").val() },
success: function(data) {alert(data)},
error: function(data) {}
});
}
$("#editFormSaveBut").on('click', function(e){
UPDATE listings
SET price = CAST(
REGEXP_REPLACE(
REGEXP_REPLACE(
REGEXP_REPLACE(details.value, 'k$|K$', '000', 'g'),
'\.[0-9]{2}$', '', 'g'),
'[^0-9]', '', 'g')
AS money)
FROM details
WHERE details.detailable_type = 'Listing'