Disable ONLY_FULL_GROUP_BY

Disable ONLY_FULL_GROUP_BY

 

Solution 1: Remove ONLY_FULL_GROUP_BY from mysql console

mysql > SET GLOBAL sql_mode=(SELECT REPLACE(@@sql_mode,'ONLY_FULL_GROUP_BY',''));

Solution 2: Remove ONLY_FULL_GROUP_BY from phpmyadmin

– Open phpmyadmin & select localhost

– Click on menu Variables & scroll down for sql mode

– Click on edit button to change the values & remove ONLY_FULL_GROUP_BY & click on save

 

 

 

 

To keep your current mysql settings and

disable ONLY_FULL_GROUP_BY

I suggest to visit your phpmyadmin or whatever client you are using and type:

SELECT REPLACE(@@sql_mode,'ONLY_FULL_GROUP_BY','')  copy_me

 

next copy result to your my.ini file.

For mint:

sudo nano /etc/mysql/my.cnf

For ubuntu 16 and up:

sudo nano /etc/mysql/my.cnf

For ubuntu 14-16:

/etc/mysql/mysql.conf.d/mysqld.cnf

 

 

 

Warning: mysqli_error() expects exactly 1 parameter, 0 given error

Warning: mysqli_error() expects exactly 1 parameter, 0 given error::

 

mysqli_error() needs you to pass the connection to the database as a parameter. Documentation here has some helpful examples:

Try altering your problem line like so and you should be in good shape:

$query = mysqli_query($myConnection, $sqlCommand) or die (mysqli_error($myConnection));

 

source: http://php.net/manual/en/mysqli.error.php

What’s the difference between MyISAM and InnoDB?

What’s the difference between MyISAM and InnoDB?

MYISAM:

  1.  MYISAM supports Table-level Locking
  2. MyISAM designed for need of speed
  3. MyISAM does not support foreign keys hence we call MySQL with MYISAM is DBMS
  4. MyISAM stores its tables, data and indexes in diskspace using separate three different files. (tablename.FRM, tablename.MYD, tablename.MYI)
  5. MYISAM not supports transaction. You cannot commit and rollback with MYISAM. Once you issue a command it’s done.
  6. MYISAM supports fulltext search
  7. You can use MyISAM, if the table is more static with lots of select and less update and delete.

INNODB:

  1. InnoDB supports Row-level Locking
  2. InnoDB designed for maximum performance when processing high volume of data
  3. InnoDB support foreign keys hence we call MySQL with InnoDB is RDBMS
  4. InnoDB stores its tables and indexes in a tablespace
  5. InnoDB supports transaction. You can commit and rollback with InnoDB