Jump to content

Whats wrong? It gets no rows from the database


TeddyKiller

Recommended Posts

The PHP code echo's "none", and I don't know why I have a row in the database, it just echo's none?

Sorry for lack of information, I'm competely stumped..

 

<?php
  include("lib.php");
  $player = check_user($secret_key, $db);
    $query = $db->execute("select * from `skills` where `type`='spells' and `user_id`=?", array($player->id)) or die("query failed: ". mysql_error());
   if($query->recordcount > 0){ 
        while($row = $query->fetchrow()) {
        echo $row['name'];
        }
    } else { echo "none"; }
        ?>

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.