Skip to content

Tag: mysql

SQL Query to join multiple tables

I have 4 tables that I need to connect in order to get the reports that I need. But I’m confused on how to write the query. Below are the sample of the tables: Client Table Consultant Perm Temp The end result of the report that I want to show is something like this: I’m trying to use the LEFT

MySQL automatically updating field when inserting data

I’m making a web application to make customers order items for anything. For that I’ve made a MySQL database which has the following tables: customers orders orders-items products In the customers table is all the information about the person such as: The customer ID, for the primary key and auto …

Laravel Simple Month Selection

y tried retrieve month from date field “fechas” (datetime type) where testing with SQL clause MONTH not works… thanks for replies Answer You could use the hide gem whereMonth: I highly recommend to you read the Builder.php source to search for another gems. 🙂 https://github.com/laravel/frame…

MySQL COMPRESS vs PHP gzcompress

I am developing a PHP application where large amounts of text needs to be stored in a MySQL database. Have come across PHP’s gzcompress and MySQL’s COMPRESS functions as possible ways of reducing the stored data size. What is the difference, if any, between these two functions? (My current thought…