Help for this page

Select Code to Download


  1. or download this
    
    $query = "   SELECT field1
    ...
    $sth1 = $dbh->prepare($query) or die->$errstr();
    
    $sth1->execute($valuesForIn) or die $dbh->errstr;
    
  2. or download this
    $query = "   SELECT field1
                    FROM table1
    ...
    $sth1 = $dbh->prepare($query) or die->$errstr();
    
    $sth1->execute(1,2,3,4,5) or die $dbh->errstr;
    
  3. or download this
    "SELECT * FROM Customers
    WHERE Country IN (SELECT Country FROM Suppliers)"