On Lun 19 Nov 2001 19:58, Olav Drageset wrote:
> Hi
> $sql = "SELECT user FROM persons WHERE user = '$firstName' and domain =
> '$domainName' ; "; $result = mysql_query($sql,$connection ) or
> die(mysql_error());
> Calling above lines from php returns:     You have an error in SQL syntax
> near ';'  at line 1

Through away the semicolon (;), that only tells the MySQL interpreter that 
the quiery should be executed.
In PHP, each call to the query function executes it.

Saludos... :-)

Porqué usar una base de datos relacional cualquiera,
si podés usar PostgreSQL?
Martín Marqués                  |        [EMAIL PROTECTED]
Programador, Administrador, DBA |       Centro de Telematica
                       Universidad Nacional
                            del Litoral

PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to