Jump to content

[SOLVED] Oring Measurements


theladycoder

Recommended Posts

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!

Link to comment
https://forums.phpfreaks.com/topic/112130-solved-oring-measurements/
Share on other sites

Okay, this is what I am trying to:

 

Let's say that $var is = to .040 (which this is in inches)

$var = @$_GET['q'];

$trimmed = trim($var) <= 0.25;

 

I want to take that value and display all values in the same table from the CS field that is within .25 either way using the query

 

$query = "select * from tablename where csInches >= $trimmed";

 

The problem is that I am not returning anything and I would like to display within 1/4" of the user input. What am I doing wrong?

 

Thanks :-\

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.