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
Tag: mysql
How To Call Procedure MySql in Laravel And Pass it to Blade.php
I got problem when i want to call procedure on MySql, this my code when i load data_saya.blade.php it’s showing an error like this but i has suplied argument foreach on my blade.php what’s wrong with my code? , Sorry for my bad english.. Answer Hi Every one this case is has been solved by doing th…
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…
Failed to connect to MySQL: Server sent charset unknown to the client. Please, report to the developers – SamplePage.php
For some reason, I can’t create the employeeTable on the sample database when opening the SamplePage.php on my Chrome browser from the following link: http://ec2-13-57-28-240.us-west-1.compute.amazonaws.com/SamplePage.php I was able to create my EC2 Instance from the AWS Create an EC2 Instance and Insta…
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 …
Laravel Eloquent ORM: Select from two tables without using find() possible?
Basically I would like to run a very simple database select query accross two tables in mysql considering a one-to-many-relationship. categories: This table contains all product-categories. The primary key is “id”. It has one column “url” which holds the string how to access this categ…
fetch join table data using eloquent laravel
I am new to laravel & want to implement eloquent relationship. Let me explain. Consider I have 2 tables products product_id product_name brand_id price brands id brand_name Each product …
How to update all rows where id is in array?
I have an array with some numbers in it, 34, 12 and 23 for example. Now I want to update all database rows where the id is in the array (when the id is 34, 12 and 23). How do I accomplish this? Any …
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