Salve a tutti,

Sto riscontrando problemi nel collegare due tabelle mysql.

la funzione è che dalla tabella 'server' deve prelevarmi le informazioni relative a ID presente nella tabella 'users'.

Io ho proceduto in questo modo:
Codice PHP:
    function get_info $user_id )
    {
        global 
$db;
        
$row $db->getRow 'SELECT userircd, passircd, reverse, ip, server FROM server LEFT JOIN users.ID = server.ID WHERE user.ID = ' $db->qstr $user_id ) );
        return 
$row->info;
    } 
e nel richiamo ho scritto

Codice PHP:
<?php echo get_info $_SESSION['user_id'] );?>
.
La pagina come output mi da
codice:
 
SQL/DB Error -- [You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '.ID WHERE user.ID = '1'' at line 1]
Sapete aiutarmi? Grazie