thekevin07
03-12-2007, 11:01 AM
Hi
Does anyone see anything wrong with the below? What it tries to do is get an email address stored in a field called value and then print it out but for some reason the value it returns is empty. The strange thing is that it works when i use anything other then email like if value is firstname it works great and returns the first name and so on with other values like company, last name etc...
PS The WHERE email=\"$email\" portion of the script is a controller and not the email i am trying to get.
Thanks
$getcontolcount=count($controller);
$controlcount=1;
while($controlcount<=$getcontolcount)
{
$query = "SELECT value FROM imports WHERE email=\"$email\" AND controller=1 AND field=\"$emailfield\" ORDER BY controller";
$result = mysql_query($query) or die(mysql_error());
while($row = mysql_fetch_array($result, MYSQL_ASSOC))
{
echo($row['value']);
}
$controlcount++;
}
Does anyone see anything wrong with the below? What it tries to do is get an email address stored in a field called value and then print it out but for some reason the value it returns is empty. The strange thing is that it works when i use anything other then email like if value is firstname it works great and returns the first name and so on with other values like company, last name etc...
PS The WHERE email=\"$email\" portion of the script is a controller and not the email i am trying to get.
Thanks
$getcontolcount=count($controller);
$controlcount=1;
while($controlcount<=$getcontolcount)
{
$query = "SELECT value FROM imports WHERE email=\"$email\" AND controller=1 AND field=\"$emailfield\" ORDER BY controller";
$result = mysql_query($query) or die(mysql_error());
while($row = mysql_fetch_array($result, MYSQL_ASSOC))
{
echo($row['value']);
}
$controlcount++;
}