Idiot needs help.

Discussion in 'PHP' started by aaron_nimocks, Aug 9, 2006.

  1. webviz

    webviz Peon

    Messages:
    216
    Likes Received:
    4
    Best Answers:
    0
    Trophy Points:
    0
    #21
    
    <?php
    
    // init classes and whatnot...
    
    if(!$db->connected)
    {
        $db->connect();
    }
    
    $db->query("SELECT * FROM `babynames` WHERE `name` LIKE `a%`");
    
    if($db->num_rows() < 1)
    {
        // wtf!? no name in db which starts with an 'a'
    }
    
    while($row = $db->fetch_array())
    {
        echo $row['name'] . "<br />\n";
    }
    
    // ...
    
    ?>
    
    PHP:
    If this helped you, then give me good rep points! ;)
     
    webviz, Aug 9, 2006 IP