30 Aralık 2015 Çarşamba

How can I redirect the user from one page to another using jQuery?

You can use the following code to redirect.

// similar behavior as an HTTP redirect
window.location.replace("http://cahitkome.blogspot.com");

// similar behavior as clicking on a link
window.location.href = "http://cahitkome.blogspot.com";

14 Aralık 2015 Pazartesi

Mysql truncate foreign key constrained table

You can't TRUNCATE a table that has Foreign Key constraints applied on it (TRUNCATE is not the same as DELETE). If you want to do this action, following code will solve your problem.

SET FOREIGN_KEY_CHECKS = 0;
TRUNCATE table1;
SET FOREIGN_KEY_CHECKS = 1;

Good luck!