ive tried the query in Phpmyadmin and it works fine yet the php file can't process it?
<?php
include "../config.php3";
include "../dbconnect.php3";
function gettoname($pmto){
$toname = "SELECT username FROM $table3 WHERE id='$pmto'";
$to1 = mysql_query($toname) or die(mysql_error());
$pm_to = mysql_result($to1, 0);
return $pm_to;
}
function getfromname($pmfm){
$fromname = "SELECT username FROM $table3 WHERE id='$pmfm'";
$from1 = mysql_query($from) or die(mysql_error());
$pmfrom = mysql_result($from1, 0);
return $pmfrom;
}
?>
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 'WHERE id='000'' at line 1