Aravona
07-19-2010, 01:29 PM
I have a site which I need to display a table based on a boolean in my database, basiacally if the product has accessories or not.
$sql = "SELECT accessory FROM ver_pro where pID='1' AND prCode = '1000107'";
$result = mysql_query($sql);
$query_data = mysql_fetch_assoc($result);
if ($query_data == 1){
//display code
}
else {
echo 'fail';
}
However all I get is the fail. I have double checked the SQL and phpmyadmin beings back Accessory as 1 which is what I expected, but I don't seem to be able to show the extra code based on this boolean... and it just lags the page out a lot and displays a blank page or a 'cannot display page' if the code is wrong, no errors even and errors are turned on.
Any help would be awesome,
Thanks in advance
Aravona
$sql = "SELECT accessory FROM ver_pro where pID='1' AND prCode = '1000107'";
$result = mysql_query($sql);
$query_data = mysql_fetch_assoc($result);
if ($query_data == 1){
//display code
}
else {
echo 'fail';
}
However all I get is the fail. I have double checked the SQL and phpmyadmin beings back Accessory as 1 which is what I expected, but I don't seem to be able to show the extra code based on this boolean... and it just lags the page out a lot and displays a blank page or a 'cannot display page' if the code is wrong, no errors even and errors are turned on.
Any help would be awesome,
Thanks in advance
Aravona