[PHP/MySQL] How to show all mysql output in php?

Results 1 to 4 of 4
  1. #1
    Sorcerer Supreme myliquid is offline
    Member +Rank
    Sep 2006 Join Date
    251Posts

    [PHP/MySQL] How to show all mysql output in php?

    how to show all mysql table output?
    ex.:
    $query=mysql("select name from account where score='9'");

    i want ouput who have score 9 :

    peter
    jack
    teddy

    anybody know how? help please?


  2. #2
    Elite Member andrew951 is offline
    Member +Rank
    Dec 2006 Join Date
    207Posts

    Re: Help, how to show all mysql output in php?

    PHP Code:
    while(mysql_query("select NAME from ACCOUNT where SCORE='9'")) {
    echo

    something like that. i forget all the needed info, but thats the basic.

  3. #3
    Elite Member Jackel is offline
    Member +Rank
    May 2005 Join Date
    Ontario, CanadaLocation
    104Posts

    Re: Help, how to show all mysql output in php?

    That's not going to work. mysql_query() only returns a resource.

    PHP Code:
     $query mysql_query("SELECT name FROM account WHERE score = 9");

     while (
    $data mysql_fetch_array($query))
        {
        echo 
    $data['name'] . "<br />";
        } 

  4. #4
    Sorcerer Supreme myliquid is offline
    Member +Rank
    Sep 2006 Join Date
    251Posts

    Re: [PHP/MySQL] How to show all mysql output in php?

    wow, it's work, thank's for help....



Advertisement