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
Post a Comment