Results 1 to 5 of 5

Thread: Whats wrong with this ?

  1. #1

    Thread Starter
    Hyperactive Member PlaGuE's Avatar
    Join Date
    Jun 2005
    Location
    in ur mind.
    Posts
    445

    Whats wrong with this ?

    It works fine when i dont have the extra stuff to show the access_name

    PHP Code:
    <?php
          $sql 
    "SELECT  a.access_lvl as accesslvl, a.access_name as access_name, ".
                    
    "u.username as username, u.id as id, u.email as email, u.status_lvl as status_lvl ".
                 
    "FROM users u ".
                 
    "JOIN site_access_lvls a " .
                  
    "ON u.status_lvl = a.access_lvl " 
                    
    "ORDER BY id DESC";
                 
    $result mysql_query($sql) or die(mysql_error());
     while(
    $row mysql_fetch_array($result)):?>
      <tr>
        <td><?php echo $row['id']; ?></td>
        <td><?php echo $row['username']; ?></td>
        <td><?php echo $row['email']; ?></td>
        <td><?php echo $row['access_name']; ?></td>
        <td><?php echo '';         ?></td>
      </tr>
    <?php endwhile;?>
    yet
    PHP Code:
          $sql "SELECT  * FROM users"
    worked.
    When i use that... it doesnt show... yet i use something similar with another page.And it shows...

    hmmm
    Last edited by PlaGuE; Jan 7th, 2006 at 09:40 PM.
    Without balance, there could only be chaos.
    Without chaos, there could be no balance.
    I live with karma. Eat with destiny. Dream of life without shackles....
    Yet. If life had no consequences, life could not exist, nor could it flourish.


    If at first you dont succeed.You're screwed.

    C++/Java NOOB.

    I aint a professional at PHP, but if i can help i will.

  2. #2
    Addicted Member Dayjo's Avatar
    Join Date
    Dec 2005
    Location
    New Zealand
    Posts
    130

    Re: Whats wrong with this ?

    You're missing a semi colon;
    PHP Code:
    <td><?php echo $row['id'?></td>
    Please specifiy the problem though, do you get an error?

  3. #3

    Thread Starter
    Hyperactive Member PlaGuE's Avatar
    Join Date
    Jun 2005
    Location
    in ur mind.
    Posts
    445

    Re: Whats wrong with this ?

    nvm fixed it.... i forgot to insert sum stuff...lol....my bad...

    i had no errors. All it was was no inserted info into a table i was calling.
    Last edited by PlaGuE; Jan 8th, 2006 at 12:21 AM.
    Without balance, there could only be chaos.
    Without chaos, there could be no balance.
    I live with karma. Eat with destiny. Dream of life without shackles....
    Yet. If life had no consequences, life could not exist, nor could it flourish.


    If at first you dont succeed.You're screwed.

    C++/Java NOOB.

    I aint a professional at PHP, but if i can help i will.

  4. #4
    PowerPoster Pc_Madness's Avatar
    Join Date
    Dec 2001
    Location
    Melbourne, Australia
    Posts
    2,765

    Re: Whats wrong with this ?

    Quote Originally Posted by Dayjo
    You're missing a semi colon;
    PHP Code:
    <td><?php echo $row['id'?></td>
    Please specifiy the problem though, do you get an error?
    That won't matter since its the only line inside of a code block
    Don't Rate my posts.

  5. #5

    Thread Starter
    Hyperactive Member PlaGuE's Avatar
    Join Date
    Jun 2005
    Location
    in ur mind.
    Posts
    445

    Re: Whats wrong with this ?

    thats what i was trying to tell him... lol..

    Its funny how a simple mistake. Can take HOURS to fix.
    Without balance, there could only be chaos.
    Without chaos, there could be no balance.
    I live with karma. Eat with destiny. Dream of life without shackles....
    Yet. If life had no consequences, life could not exist, nor could it flourish.


    If at first you dont succeed.You're screwed.

    C++/Java NOOB.

    I aint a professional at PHP, but if i can help i will.

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