This is the product table.
The part of the red circle is the product's Column group ID.
This is the Product column table.
My question now is:
From the front end, I pass the ID of a product column table through get, how to determine the column ID of the product table and the field of get pass-through after obtaining this ID.
SQL statements
Thank you for your advice.
Reply to discussion (solution)
After taking $n_id.
In the form of a product? $n _id to find out if it exists???, if yes, the ID of the product list, and then can?? The following event.
SELECT * FROM Product list where nav_id= $n _id;
After taking $n_id.
In the form of a product? $n _id to find out if it exists???, if yes, the ID of the product list, and then can?? The following event.
SELECT * FROM Product list where nav_id= $n _id;
I may not be able to express
I'd like to give you an example.
I pass a n_id=10001 through get, I want to use this parameter to find the product table Pro_navid contains 10001 of the data
Returns two data from the blue circle of the product table
... find_in_set (' n_id ', Pro_navid)
Aren't those points in your pro_navid a decimal point? Change to Comma
SELECT * FROM Product Catalog table where nav_id like% $n _id%;
Just that will be a problem!!! This puts: SELECT * from Product Catalog table where nav_id like%, $n _id,%;
Just that will be a problem!!! This puts: SELECT * from Product Catalog table where nav_id like%, $n _id,%;
Okay, I'll try, thank you.
$SQLSTR = "SELECT * from" table where Concat (', ', ' Pro_navid, ', ') like '%, ". $n _id." %,';
... find_in_set (' n_id ', Pro_navid)
Aren't those points in your pro_navid a decimal point? Change to Comma
It's separated by commas, I'll try, thank you.
$SQLSTR = "SELECT * from" table where Concat (', ', ' Pro_navid, ', ') like '%, ". $n _id." %,'";
?? Just?
$SQLSTR = "SELECT * from" table where Concat (', ', ' Pro_navid, ', ') like '%, ". $n _id.",% ' ";
$SQLSTR = "SELECT * from" table where Concat (', ', ' Pro_navid, ', ') like '%, ". $n _id." %,'";