unemployment Posted January 26, 2011 Share Posted January 26, 2011 I am querying... $sql = "SELECT `messages_inbox`.`message_id`, `users`.`firstname`, `users`.`lastname`, `users`.`username` AS `from`, '${user_info['username']}' AS `to`, `subject`, LENGTH(`files`) AS `len`, 'inbox' AS `box`, DATE_FORMAT(`messages_inbox`.`time` ,'%T %D-%M-%Y') AS `time` "; $sql .= "FROM `messages_inbox` INNER JOIN `users` ON `messages_inbox`.`from_id` = `users`.`id` WHERE `to_id` = ${user_info['uid']} AND `messages_inbox`.`deleted` = 0 ORDER BY `messages_inbox`.`message_id` DESC"; and I am trying to output $displayName = ucwords("${message['firstname']} ${message['lastname']}"); by using $messages = pm_fetch_all($_GET['box']); I know my fetch works but for some reason firstname and lastname are only returning the logged in users first name and last name, not the person who sent the message. Link to comment https://forums.phpfreaks.com/topic/225788-wrong-echo-or-wrong-query/ Share on other sites More sharing options...
Maq Posted January 26, 2011 Share Posted January 26, 2011 (Please place or tags around your code next time) Link to comment https://forums.phpfreaks.com/topic/225788-wrong-echo-or-wrong-query/#findComment-1165662 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.