To insert multiple rows with a single query you can use regular insert with multiple value rows. You can also use update if you have primary key set.
You are here
MySQL is a relational database management system that runs as a server providing multi-user access to a number of databases.
16 May, 2018
16 May, 2018
Import csv file to MySQL, the fastest way is to use a direct import with query. You have to have the columns created the way you need.
8 May, 2018
Example query for direct csv saving from mysql. Using query to import or export data is the fastest method. You can export your query results as csv with custom syntax. You have to use union to join...
27 Jan, 2017
From version 5.7 MySQL stops supporting zeros value in date / datetime. If you have those values in your database you get errors for queries, like group by. Also you are not able to insert zero dates...
21 Sep, 2016
If you need to show user different content whether a table is empty or not. So you would need to count table rows for that. Counting every row will iterate through the table rows and is really slow....
25 Apr, 2016
Group by date when using datetime datatype. In this snippet the grouping is used to pull out monthly statistics. The query is pretty much self explanatory. Group by in mysql can help you to bring...
5 Dec, 2014
MySQL configuration that I am using for developing Drupal in localhost. The config file can be found from /etc/mysql/my.cnf under Linux. I would use it for any apache instance tough. You might get...
14 Mar, 2014
Using this the query in this snippet enables you to convert character set to utf8. This works in mysql or mysql like database, drop-in databases like mariadb for an example.
9 Nov, 2013
Snippet showing, how to do string replace in MySQL. In this example we update a field with the same field content except we run it through string replace. This is the same as find...