# Selecting single entry from db

**URL:** <https://forum.kirupa.com/t/selecting-single-entry-from-db/247120>\
**Category:** programming\
**Created:** [December 18, 2007, 7:26pm UTC](https://forum.kirupa.com/t/selecting-single-entry-from-db/247120 "2007-12-18T19:26:36Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![koolkrasher](https://avatars.discourse-cdn.com/v4/letter/k/c6cbf5/32.png) [@koolkrasher](https://forum.kirupa.com/u/koolkrasher)\
**Post date:** [December 18, 2007, 7:26pm UTC](https://forum.kirupa.com/t/selecting-single-entry-from-db/247120/1 "2007-12-18T19:26:36Z")

</div>

Im having a little problem selecting a single entry from a db\>\<  
heres my code

```php

  <?php 
$name= mysql_query(" SELECT 'team_name' FROM `team` WHERE team_id =1");
             if (!$name){
             die("Database query failed: " . mysql_error());
            } 
          
          
          echo "$name";
          
          
          ?>

```

i ran it through the sql console in phpmyadmin and it worked fine but when i jumped over into php and tried executing it echos out the following

Resource id#5

any ideas what im dooing wrong?
