Jump to content

jamesmfarrow

New Members
  • Content Count

    4
  • Joined

  • Last visited

Community Reputation

0 Neutral

About jamesmfarrow

  • Rank
    Newbie
  1. I am new to php and 'giving it a go' - no doubt I will be here again asking daft questions.. Thanks to everyone who took the time to help me - it is appreciated!!
  2. Strider64 - thanks very much!! I used your solution and adapted it slightly to fit what I needed and it works!! The query results are returned. Thanks again!
  3. Hello everyone - I have picked dup a book on php and SQL and have been quaking through it. I have come across a problem with a foreach statement that I can not resolve. Any help and advice is greatly appreciated! <?php try { $pdo = new PDO('mysql:host=localhost;dbname=ijdb; charset=utf8', 'ijdbuser', 'mypassword'); $pdo->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION); $sql = 'SELECT `joketext` FROM `joke`'; $result = $pdo->query($sql); while ($row = $result->fetch()) { $jokes[] = $row['jo
×
×
  • 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.