TOC Grouped





[insert_php]
/* Attempt MySQL server connection. Assuming you are running MySQL
server with default setting (user ‘root’ with no password) */
$link = mysqli_connect(“localhost”, “streetcontinuity”, “Deb99bie!”, “continuitybook”);

// Check connection
if($link === false){
die(“ERROR: Could not connect. ” . mysqli_connect_error());
}

// Attempt select query execution
$sql = “SELECT * FROM TOC Order by Chapnum”;
if($result = mysqli_query($link, $sql)){
if(mysqli_num_rows($result) > 0){
echo “

“;
echo “

“;
echo “

“;
echo “

“;
echo “

“;
while($row = mysqli_fetch_array($result)){
echo “

“;

$a = $row[‘Chapnum’];
if(fmod($a, 1) == 0.5){
//if ($a == 0.5) {
echo “

“;
}
else {

// echo “

“;
echo “

“;
echo “

“;

}
echo “

“;
}
echo “

Chapter Chapter Name
“.”
” . $row[‘Chapname’] .”
” . $row[‘Chapnum’] . “
” . round($row[‘Chapnum’], 0) . “
” . $row[‘Chapname’] . “

“;
// Free result set
mysqli_free_result($result);
} else{
echo “No records matching your query were found.”;
}
} else{
echo “ERROR: Could not able to execute $sql. ” . mysqli_error($link);
}

// Close connection
mysqli_close($link);
[/insert_php]

AVAILABLE NOW!

Special Paperback and eBook Intro Pricing 

Contact us for Special Volume Pricing