espylacopa
May 24th, 2005, 05:17 PM
I have a stupid question.....
how do I get the value of a field to display? There is only one record in the table and always will be, I am using an SQL statement to pull the info. But when I try and display it on my page it says Resource id #5 instead of the value of the field? But the query works fine when i do it in MySQL so I think my code must be wrong.
Here is my code:
$getDate="SELECT WeekText FROM viewcal";
$resultDate = mysql_query($getDate) or die(mysql_error());
while ($getDate2 = mysql_fetch_array($resultDate)) {
echo $resultDate;
}
how do I get the value of a field to display? There is only one record in the table and always will be, I am using an SQL statement to pull the info. But when I try and display it on my page it says Resource id #5 instead of the value of the field? But the query works fine when i do it in MySQL so I think my code must be wrong.
Here is my code:
$getDate="SELECT WeekText FROM viewcal";
$resultDate = mysql_query($getDate) or die(mysql_error());
while ($getDate2 = mysql_fetch_array($resultDate)) {
echo $resultDate;
}