I was playing with some statistics and wanted to display some queries as a single, comma-delimited text. Why one may need this? Since the result of the queries can be concatenated in an endless ways by (eg. PHP) code… The answer: to have one-line query returning directly the string – eg. for statistical purposes only. […]
Category: MySQL
MySQL: Select field, replace text from another table
I have two tables, “products” and “brands”. In the “products” table, the product’s name is in the “name” field. The product’s brand is represented by the # (diez) character. To know which is the brand, there’s a “brand_id” field. So far we have: products table: id: int name: varchar brand_id: int brands table: id: int […]