Jump to content

Quick question on query!!!


snowman15

Recommended Posts

Hey everyone, for some reason, this script isnt working. It just doesn't echo anything. What is wrong with my syntax?

 

$query="SELECT *
FROM `users`
WHERE `user` LIKE $username;";
$result = $db->query($query);
$row= $result->fetch_assoc();
$fname=$row['first'];
$lname=$row['last'];
echo "$fname $lname";

 

 

 

assuming $username is set

Link to comment
https://forums.phpfreaks.com/topic/95190-quick-question-on-query/
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.