Jump to content

Select Problem


forumnz

Recommended Posts

What have I done wrong? It should be simple.

 

Code:

<?php $uid = $row['uid'] ;
echo $uid; 

$con = mysql_connect("localhost","aaa","aaa");
if (!$con)
  {
  die('Could not connect: ' . mysql_error());
  }

mysql_select_db("aaa", $con);

$result = mysql_query("SELECT * FROM currentclients WHERE 'id'=$uid");

while($row = mysql_fetch_array($result))
  {
$fname = $row['fname'] ;
$lname = $row['lname'] ; 
$url = $row['url'] ; 
$email = $row['email'] ; 
$address = $row['address'] ; 
$phone = $row['phone'] ; 
$active = $row['receive'] ;
}

echo $fname;
mysql_close($con);


?>

 

Error:

Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in /usr/local/www/vhosts/aaa.com/httpdocs/clientemail/edit.php on line 22

 

Thanks,

Sam.

Link to comment
https://forums.phpfreaks.com/topic/83059-select-problem/
Share on other sites

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.