Create a new database with MySQL Workbench

Launch MySQL Workbench. On the left pane of the welcome window, choose a database to connect to under “Open Connection to Start Querying”. The query window will open. On its left pane, there is a section titled “Object Browser”, which shows the list of databases. (Side note: The terms “schema” and “database” are synonymous in … Read more

SQL Query Where Field DOES NOT Contain $x

What kind of field is this? The IN operator cannot be used with a single field, but is meant to be used in subqueries or with predefined lists: If you are searching a string, go for the LIKE operator (but this will be slow): If you restrict it so that the string you are searching … Read more

PHP Deprecated: Methods with the same name as their class will not be constructors in a future version of PHP

Solution : Rename your function name emailcomm() to __construct() Explanation: In previous versions of PHP, if PHP cannot find a __construct() function for a given class, it will search for the old-style constructor function, by the name of the class, but now old style constructors are DEPRECATED in PHP 7.0, and will be removed in a future version. You should always use  __construct() in new code. Read php manual

Setting up foreign keys in phpMyAdmin?

If you want to use phpMyAdmin to set up relations, you have to do 2 things. First of all, you have to define an index on the foreign key column in the referring table (so foo_bar.foo_id, in your case). Then, go to relation view (in the referring table) and select the referred column (so in … Read more

When to use SELECT … FOR UPDATE?

The only portable way to achieve consistency between rooms and tags and making sure rooms are never returned after they had been deleted is locking them with SELECT FOR UPDATE. However in some systems locking is a side effect of concurrency control, and you achieve the same results without specifying FOR UPDATE explicitly. To solve this problem, Thread … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)