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

Please follow and like us:
0

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
Please follow and like us:
0