Question
Mysql Select Problem
Good day all.
Im having problems with selecting information from a mysql database.
This is what i want to do.
I have a table with a bunch of products and prices in them.
This is the query i use to access the info which works perfectly
"
SELECT CONCAT(groupno,"-",subcode) AS 'Key', CONCAT(groupno, " - ",subcode," - ",headertext," - ",description," -R",price) as 'VALUE'
FROM subgroups
WHERE
subcode LIKE '#FORM.Search#'
"
Now While that query is running i want to check the table "inventory" to see if i have the items in stock
a sample query would be something like
"
SELECT *
FROM
inventory WHERE subgroup = ''#FORM.search#' AND sold = 'no'
"
I beleive one could get this total with the COUNT option in mysql. But how do i make the initla query go find the total inventory items in stock.
Ive tried reading about inner JOIN. but that does not make much sence to me.
Any help would be greatly appreciated
Im having problems with selecting information from a mysql database.
This is what i want to do.
I have a table with a bunch of products and prices in them.
This is the query i use to access the info which works perfectly
"
SELECT CONCAT(groupno,"-",subcode) AS 'Key', CONCAT(groupno, " - ",subcode," - ",headertext," - ",description," -R",price) as 'VALUE'
FROM subgroups
WHERE
subcode LIKE '#FORM.Search#'
"
Now While that query is running i want to check the table "inventory" to see if i have the items in stock
a sample query would be something like
"
SELECT *
FROM
inventory WHERE subgroup = ''#FORM.search#' AND sold = 'no'
"
I beleive one could get this total with the COUNT option in mysql. But how do i make the initla query go find the total inventory items in stock.
Ive tried reading about inner JOIN. but that does not make much sence to me.
Any help would be greatly appreciated
