Skip to content

Tag: mysql

For inside of for loop PHP

How i can assign to multiple categories multiple variants like colors, for example i have a product who can be in 3 categories but this product have 3 colors as variants how i can make a mysql structure to avoid insert in same row delimited by comma. There is what is tried: And what i want to do is to

PHP – Issue with PDO using CONCAT() with SQLite

I’m using the same query, through PDO connector, to concatenate string in both: MySQL database and a mirroring SQLite one. Both they have same table same structure etc. But when the query is executed, MySQL performs the query correctly, while SQLite goes in error thus I get an error 500. Is there a solu…

How to disable title if MySql field is blank/null/none [closed]

Closed. This question needs details or clarity. It is not currently accepting answers. Want to improve this question? Add details and clarify the problem by editing this post. Closed 1 year ago. Improve this question I am trying to display profile from MySql database using PHP, here is the simple code: Now I …

Find the names of last queried tables

I have a query inside my PHP program like SELECT table_a.firstname, table_a.lastname, table_b.english_score, table_b.maths_score FROM table_a INNER JOIN table_b ON table_b.student_id = table_a.id …

How to get next and previous id on CodeIgniter3?

I have the following DB. As you can see, the ID is missing a tooth. so you cannot get a valid previous or next ID by simply adding or subtracting 1 to the current ID In SQL, to get a valid back and forth ID, I would write the following. I want to get this kind of record retrieval in