MySQLi – Querying

$sql = "SELECT name, phone FROM contacts where contactID=12";
$results = $db->query($sql);
$rows = $result->fetch_assoc();

// Display results stored in $rows[]
echo "<p>$rows['name']</p>";
echo "<p>$rows['phone']</p>";

or for returning more than one item:

$sql= "SELECT * FROM contacts ORDER BY name";
$result = $db->query($sql);
while ($rows = $result->fetch_assoc()) 
{
    echo "<p>$row['name'] $row['phone']</p>";
}

Leave a Comment

Filed under PHP

MySQLi – Connect to a database

$db = new mysqli('localhost', 'username', 'password', 'database');

if($db->connect_errno > 0){
    die('Error connecting to database [' . $db->connect_error . ']');
}

Leave a Comment

Filed under PHP

John Duggan’s Cheltenham Tips (2014)

FRIDAY:

1.30 – €35 each way on Tiger Roll at 10/1
2.05 – €35 each way on Cheltenian at 8/1
3.20 – €50 each way on Last Instalment at 15/2 and €25 each way on Lord Windermere at 28/1
4.00 – €70 each way on Harbour Court at 9/2
4.40 – €35 each way on Leo Luna at 14/1

Continue reading

Leave a Comment

Filed under Sport

Irish Ukranians, Not Russians

bart

via broadsheet.ie

RTE program Primetime suffered an embarrassing technical failure last night.

Leave a Comment

Filed under Entertainment

San Francisco Bay from Sausalito

A black and white of San Francisco taken from Sausalito.

Leave a Comment

Filed under General

Euro 2016 Qualifiers

Euro 2016 qualifier fixtures (Kick-offs Irish time):

  • Georgia v Ireland, 7 September 2014, KO 5pm
  • Ireland v Gibraltar, 11 October 2014, KO 5pm
  • Germany v Ireland, 14 October 2014, KO 7.45pm
  • Scotland v Ireland, 14 November 2014, KO 7.45pm
  • Ireland v Poland, 29 March 2015, KO 7.45pm
  • Ireland v Scotland, 13 June 2015, KO 5pm
  • Gibraltar v Ireland, 4 September 2015, KO 7.45pm
  • Ireland v Georgia, 7 September 2015, KO 7.45pm
  • Ireland v Germany, 8 October 2015, KO 7.45pm
  • Poland v Ireland, 11 October 2015, KO 7.45pm

 

Leave a Comment

Filed under Sport

Comments Off

Filed under General