echo mysql column based on other column name with php -


first of apologize title. don't know correct names of mysql tables are. have mysql table looks following.

'id'  | 'username' | 'password' | 'product' | 'price' '1'   | 'ben'      | 'hashedpw' | 'desktop' | '120' '2'   | 'steve'    | 'hashedpw' | 'laptop'  | '300' 

lets database named hardware , user database called owner password called password , table called tech

how able use php echo product prices.

$sql = "select * users"; $query = mysql_query( $sql );  $row['prodyct']; 

what i'm having trouble figuring out how result show price of desktop only. can't use id since id's missing @ different times.

select price tech product = 'desktop'; 

Comments

Popular posts from this blog

html5 - What is breaking my page when printing? -

html - Unable to style the color of bullets in a list -

c# - must be a non-abstract type with a public parameterless constructor in redis -