PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!
and [syntax="..."] tags where appropriate when posting code. Your post has been edited to reflect how we'd like it posted. Please read: [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url] to learn how to do it too.[/color]
This code is suppose to select all the names in a table named yahoo that have an id of 44 and display them on the screen.
Any help would be greatly appreciated.
and [syntax="..."] tags where appropriate when posting code. Your post has been edited to reflect how we'd like it posted. Please read: [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url] to learn how to do it too.[/color]
$array['name'] doesn't exist. You are using mysql_fetch_array($result), when you want to use mysql_fetch_assoc($result) or (if your PHP is old) mysql_fetch_array($result, MYSQL_ASSOC).
BTW, you're querying twice. It won't affect your results, but it will affect your bandwidth.