Jump to content

TapeGun007

Members
  • Posts

    296
  • Joined

  • Last visited

Community Answers

  1. TapeGun007's post in PDO version of num_rows? was marked as the answer   
    @gizmola, Yes, I just read that actually on a website, but I tried this instead and it seems to work fine (more along the lines of what Jacques suggested).  I want to simply check for any data so it doesn't bother building out a table for nothing.
     
     
    $stmt = $con->prepare($sql); $stmt->execute($params); $row = $stmt->fetch(PDO::FETCH_ASSOC);   if ($row){         echo "<br>Not Empty<br>"; }else{     echo "<br>Empty<br>"; }
  2. TapeGun007's post in Can you store $con into an array? was marked as the answer   
    I think I have it already... I was too quick to post.  I see my syntax error above as well.
     
    I think this will work:
    foreach($statedb as $x => $x_value){ $con[$x] = new mysqli($DBServer, $DBUser, $DBPass, $x_value); }
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.