skip to Main Content

MyISAM racing conditions / LOCK TABLES – Phpmyadmin

My 'invoices' table: CREATE TABLE `invoices` ( `id` int(10) unsigned NOT NULL AUTO_INCREMENT, `invoice_id` int(11) NOT NULL, PRIMARY KEY (`id`,`invoice_id`), UNIQUE KEY `invoice_id` (`invoice_id`), KEY `order_id` (`order_id`) ) ENGINE=MyISAM AUTO_INCREMENT=115 DEFAULT CHARSET=utf8 When I try the query : mysqli_query($conn, "LOCK…

VIEW QUESTION

PDO run script from .sql file – Phpmyadmin

How correctly run sql file for insert in MySQL? Try use PDO: $mysql_host = "localhost"; $mysql_database = "planets_test"; $mysql_user = "root"; $mysql_password = ""; # MySQL with PDO_MYSQL $dbh= new PDO("mysql:host=$mysql_host;dbname=$mysql_database", $mysql_user, $mysql_password); $query = file_get_contents("planets_db.sql"); $stmt = $dbh->prepare($query); $stmt->execute();…

VIEW QUESTION
Back To Top
Search