I want the php to return only the records that have the "onebuttoneshaft" value in the "typecase" field.
Here's the error message:
Unknown column 'onebuttoneshaft' in 'where clause'
<html>
<head>
<title>Test PHP</title>
</head>
<body>
<table border="1">
<tr>
<th>Part Number</th>
<th>Description</th>
<th>Suggested</th>
<th>Discount</th>
<th>Price</th>
</tr>
<?php
include('db_login.php');
mysql_connect($db_host, $db_username, $db_password) or exit(mysql_error());
mysql_select_db($db_database) or exit(mysql_error());
$result = mysql_query('SELECT * FROM cases WHERE typecase=onebuttoneshaft ORDER BY price,partno LIMIT 0, 30') or exit(mysql_error());
while ($row = mysql_fetch_assoc($result))
{
echo '
<tr>
<td>' . $row['partno'] . '</td>
<td>' . $row['description'] . '</td>
<td>' . $row['suggested'] . '</td>
<td>' . $row['discount'] . '</td>
<td>' . $row['price'] . '</td>
</tr>
';
}
?>
</table>
</body>
</html>
Thanks
Rock