SitePoint Sponsor

User Tag List

Results 1 to 3 of 3
  1. #1
    SitePoint Member
    Join Date
    Aug 2002
    Posts
    9
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    How to link mysql fetch array to other

    yoyo i have problem i dont get this:

    PHP Code:
    $getcountwood mysql_db_query($dbname"SELECT wood FROM gamerecource WHERE 1"); 

    $countwood2 mysql_fetch_array($getcountwood); 

    countwood $countwood $lumbermillcount; <-- line 47 

    it gives big errohr but i dont now why:

    Fatal error: Unsupported operand types in /home/virtual/site99/fst/var/www/html/test/buildings/lumbermill.php on line 47

    i think it doesn't want to be linked with the mysql query but why and wut is tha solutiononen?

  2. #2
    We like music. weirdbeardmt's Avatar
    Join Date
    May 2001
    Location
    Channel Islands Girth: Footlong
    Posts
    5,882
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    For a start your query isn't correct and you don't show us any of the useful bits but this is also wrong:

    PHP Code:
    countwood $countwood $lumbermillcount
    should be

    PHP Code:
    $countwood $countwood $lumbermillcount
    but I would surprised if that was the only error in your script.
    I swear to drunk I'm not God.
    Matt's debating is not a crime
    Hint: Don't buy a stupid dwarf Clicky

  3. #3
    SitePoint Member
    Join Date
    Aug 2002
    Posts
    9
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    the query is good, when i echo $countwood2 like this
    PHP Code:
     echo($countwood2['wood']); 
    it just echos perfectly what i want but, i can't use $countwood2 for ANYTHING else, else i get that error. And I can be more specific if you tell me what usefull bits you need
    i can give you the whole script if you want, but i thougt that was unnesecarry

    and that was just a copy & paste mistake that i foget to copy the $
    Last edited by yoda; Sep 1, 2002 at 04:22.


Bookmarks

Posting Permissions

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