Skip to content

Tag: php

MySQL. Retrieve data from many tables with column in common

I have the following tables in my database. TABLE_AVATAR TABLE_DOCUMENTS My goal is to retrieve all data from all the tables for each employee. TABLE_EMPLOYEES will contain 1 row per record (I need all data), TABLE_AVATAR can hold many rows per record (I only need the newest one (id desc)), and TABLE_DOCUMENT…

Show a text depending on the value of a column MySQL

I would like to know, how can I build a query that shows me an extra column where instead of showing the true value of the original column it shows me the text that i want? For example, The Column, in this case “inputOutput”, save values ​​0 or 1, and I would like to show in a query that if

PHP 7.4 Warning: Creating default object from empty value

The apache error logs are filling up with this. I don’t want to suppress all errors though, and understand I need to create an object explicitly somewhere but the syntax escapes me. Warning: Creating default object from empty value in libraries/cegcore2/libs/helper.php on line 22 Answer The problem is t…