PDA

Click to See Complete Forum and Search --> : Stupid Question [RESOLVED]


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;
}

The_Duck
May 24th, 2005, 05:20 PM
try echo $getDate2(0)

Been a while since I looked at PHP im not 100% sure about the array parenthesis !

espylacopa
May 24th, 2005, 05:55 PM
Didnt work Duck, but I figured it out on my own. THanks