MATH-Oring calculation

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
theladycoder
Forum Newbie
Posts: 2
Joined: Thu Jun 26, 2008 11:12 pm

MATH-Oring calculation

Post by theladycoder »

I am fairly new to PHP and I am not sure where to start. I need to perform a calculation based on user input. For example:

You should be able to type in any value in the inside diameter or cross sectional diameter boxes. For example 1.4332”. The computer will look at this as an inch dimension and also a metric dimension. It will find all inside diameters from the standard and metric o-ring database that are within ¼” of this dimension. Then the customer will type in the cross sectional diameter they desire. This time the computer will only search from the first list of inside diameters that it came up with and match all the ones that have that inside diameter and a cross section that is within 1/32” of what the customer typed in. That will give the customer a final list to choose from. They will pick one or more from the list.

I am not sure how to go about this and would greatly appreciate any help! :?: :?:
User avatar
Christopher
Site Administrator
Posts: 13596
Joined: Wed Aug 25, 2004 7:54 pm
Location: New York, NY, US

Re: MATH-Oring calculation

Post by Christopher »

Unless you need to display the first list, I would just have the user enter both diameters and then do a query. The query is just an `ID`>=$userID AND `OD`<=$userOD kind of check...
(#10850)
theladycoder
Forum Newbie
Posts: 2
Joined: Thu Jun 26, 2008 11:12 pm

Re: MATH-Oring calculation

Post by theladycoder »

That might work...will give it a try. Thanks
Post Reply