How to unblock with mysqladmin flush hosts

mysqladmin is not a SQL statement. It’s a little helper utility program you’ll find on your MySQL server… and “flush-hosts” is one of the things it can do. (“status” and “shutdown” are a couple of other things that come to mind). You type that command from a shell prompt. Alternately, from your query browser (such … Read more

SQL – IF EXISTS UPDATE ELSE INSERT INTO

What I’m trying to do is INSERT subscribers in my database, but IF EXISTS it should UPDATE the row, ELSE INSERT INTO a new row. Ofcourse I connect to the database first and GET the $name, $email and $birthday from the url string. This works, but just adds the new row; Here’s what I tried; … Read more

MySQL Error 1215: Cannot add foreign key constraint

I’m guessing that Clients.Case_Number and/or Staff.Emp_ID are not exactly the same data type as Clients_has_Staff.Clients_Case_Number and Clients_has_Staff.Staff_Emp_ID. Perhaps the columns in the parent tables are INT UNSIGNED? They need to be exactly the same data type in both tables.