hi everyone,
I am trying to create an inventory using php/mysql.
However, I am using a webpage such that the viewer or user indicates or picks their choice by making continous selections on the spry menu.
For example, if the first choice is "x", another menu appears with several options and say they pick "Y". This also leads to another menu, say they pick "Z". The items "x","Y" and "Z" fall under different columns in the database table.

Is it possible to create a mysql query that picks data from the table that matches "x", "Y", "Z"?

Thanx

Sure it is. You can do something like:

SELECT * FROM <databaseTable>
WHERE columnX = 'x'
AND columnY = 'Y'
AND columnZ = 'Z'

Thanx.
I'll try that.

I don't understand he code. How don' t you have to communicate the variables 'x' , 'y', and 'z' to mysql first using php? How do you do that?

So you want to add the data to the database? Sorry, I thought you were asking to retrieve all entries already in the database with those values. The SQL would then be something like:

INSERT INTO <databaseTable>
(columnX, columnY, columnZ) VALUES
('x', 'Y', 'Z')

yes, but i have to communicate the data from the web page to mysql (am using php). I am failing to do this because the user does not supply the data using a web form but a spry menu. For example to begin MS Word, you click start on the desktop, then programs, then MS Office, and then MS Word. If this were my web page, I want to send the choices "start", "programs", "msoffice" and "ms word" to mysql as the user inputs. How can i do this? Pliz help.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.