Results 1 to 3 of 3

Thread: Stupid Question [RESOLVED]

  1. #1

    Thread Starter
    Addicted Member
    Join Date
    Jan 2005
    Posts
    131

    Resolved Stupid Question [RESOLVED]

    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:
    VB Code:
    1. $getDate="SELECT WeekText FROM viewcal";
    2. $resultDate = mysql_query($getDate) or die(mysql_error());
    3.  
    4. while ($getDate2 = mysql_fetch_array($resultDate)) {
    5. echo $resultDate;
    6. }
    Last edited by espylacopa; May 24th, 2005 at 05:54 PM.
    Things fall apart which the center cannot hold...

  2. #2
    Hyperactive Member The_Duck's Avatar
    Join Date
    May 2005
    Location
    Leamington, UK
    Posts
    351

    Re: Stupid Question

    try echo $getDate2(0)

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

  3. #3

    Thread Starter
    Addicted Member
    Join Date
    Jan 2005
    Posts
    131

    Re: Stupid Question [RESOLVED]

    Didnt work Duck, but I figured it out on my own. THanks
    Things fall apart which the center cannot hold...

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width