deep-wood
06-18-2006, 06:19 AM
im trying to get my head round php. I understand asp, so maybe this is where im falling....anyway
$str_id = 1;
$query="SELECT * FROM table1 where rec_id=$str_id";
$result=mysql_query($query);
$num=mysql_numrows($result);
if ($num > 0){
echo $result['rec_id'];
}else{
echo "nothing to show from sql<br />";
}
whats wrong with this? im just trying to select one record but im getting nothing.....:S
thanks for your time..
$str_id = 1;
$query="SELECT * FROM table1 where rec_id=$str_id";
$result=mysql_query($query);
$num=mysql_numrows($result);
if ($num > 0){
echo $result['rec_id'];
}else{
echo "nothing to show from sql<br />";
}
whats wrong with this? im just trying to select one record but im getting nothing.....:S
thanks for your time..