Jump to content

Recommended Posts

Posted

OK, the way I'd be doing it is by creating a table with a field as a unique ID for each model of machine, and a field for its name.

 

Then a table for error codes (with a unique ID again, and a field for the code and a field for the information to store).

 

Then a table which connects the 2 - so it'd have 3 fields. 1 UID, 1 which contains the ID of the machine and 1 which contains the ID of the error code.

 

So, then in your page, you can SELECT * FROM tblMachines, using the ID field as the value and the name as the visible name for each model in a select item. Then when you send that data (via onChange or via a submit button), you can then SELECT tblErrorCodes.CodeNumber, tblErrorCodes.CodeDetails, FROM tblErrorCodes, tblLink WHERE tblErrorCodes.ID = tblLink.ErrorID AND tblMachines.ID = tblLink.MachineID.

 

Then you can output and format that as you wish.

 

That make sense?

  • Thanks 2
Posted (edited)
OK, the way I'd be doing it is by creating a table with a field as a unique ID for each model of machine, and a field for its name.

 

Then a table for error codes (with a unique ID again, and a field for the code and a field for the information to store).

 

Then a table which connects the 2 - so it'd have 3 fields. 1 UID, 1 which contains the ID of the machine and 1 which contains the ID of the error code.

 

So, then in your page, you can SELECT * FROM tblMachines, using the ID field as the value and the name as the visible name for each model in a select item. Then when you send that data (via onChange or via a submit button), you can then SELECT tblErrorCodes.CodeNumber, tblErrorCodes.CodeDetails, FROM tblErrorCodes, tblLink WHERE tblErrorCodes.ID = tblLink.ErrorID AND tblMachines.ID = tblLink.MachineID.

 

Then you can output and format that as you wish.

 

That make sense?

 

afraid not - my sql / database skills are pants :(

 

edit

 

ok re read that and think I would have to be shown via a video or in person or something to understand what you are doing using php my admin or something along those lines how to do all that.

 

Would be good to find an example of how to use java script to select the name select value in order to use php to swap between the tables depending on which value was selected from the drop down

Edited by mac_shinobi
Posted
depends on website, its certaintly used alot more now with the web 2.0 craze, for example facebook and google(igoogle specifically) both use ajax. it will become even more popular in the future as users want more pc type applications from the web. Ive seen a few jobs that require AJAX but not too many.
Posted
Just curious is there much demand for ajax in web dev ?

 

Ajax is very important in web dev now. People can't stand waiting for page loads, so ajax is important.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now



×
×
  • Create New...