Hello world!

Portland Wedding Photographer - January 7, 2003

Welcome!

Portland Wedding Photographer - September 21, 2005
empty image
empty image
[php] $DBServer = ‘mysql-blog.c9snva5j3asb.us-west-2.rds.amazonaws.com’; // e.g ‘localhost’ or ‘192.168.1.100’
$DBUser = ‘gg86e77e40d2d’;
$DBPass = ‘FFAD57DA-F833-41BE-A5E7-568A85BFEB2C’;
$DBName = ‘gg86e77e40d2d’;
$conn = new mysqli($DBServer, $DBUser, $DBPass, $DBName);

// check connection
if ($conn->connect_error) {
echo ‘Database connection failed’;
}

$poststring= “SELECT ID,post_title, post_name FROM wp_posts WHERE (post_type = ‘post’) AND post_status=’publish’ ” ;

$posts=$conn->query($poststring);

if($posts === false) {
trigger_error(‘Wrong SQL: ‘ . $poststring . ‘ Error: ‘ . $conn->error, E_USER_ERROR);
} else {
$rows_returned = $posts->num_rows;
}

$posts->data_seek(0);
while($single = $posts->fetch_assoc()){

$slug_base = $single[‘post_name’];
echo $slug_base.”[br]”;

}
$posts->free();

[/php]