Bookify söker ny ägare och kommer stängas ner under 2026. Intresserad av att driva Bookify vidare? Hör av dig till kontakt[at]bookify.se
include "../data/scripts/connect.php";
include "../data/scripts/functions.php";
$time = microtime();
$time = explode(' ', $time);
$time = $time[1] + $time[0];
$start = $time;
/*
$table_id = table_id($conn);
$nr_of_res = mysqli_query($conn,"SELECT MATCH(title, isbn, author) AGAINST ('$search_string') AS score from allproducts".$table_id." WHERE MATCH (title, isbn, author) AGAINST('$search_string') LIMIT 225");
$nr_of_res = mysqli_num_rows($nr_of_res);
*/
$page_rows = 25;
$max_matches =225;
if (!empty($_GET['page'])) {
$pagenum = intval($_GET['page']);
if (empty($pagenum) || $pagenum < 1) {$pagenum = 1;}
$currentOffset = ($pagenum -1)* $page_rows;
if ($currentOffset > ($max_matches-$page_rows) ) {
$pagenum = 9;
}
} else {
$pagenum = 1;
$currentOffset = 0;
}
include('../data/scripts/sphinxapi.php');
$s = new SphinxClient;
$s->setServer("127.0.0.1", 9312);
$s->SetLimits($currentOffset,$page_rows);
$s->setMatchMode(SPH_MATCH_EXTENDED2);
$s->SetSortMode(SPH_SORT_EXTENDED, $order_by);
$result = $s->Query($search_string);
$nr_of_res = $result['total'];
$nr_of_pages = ceil($result['total']/$page_rows);
if($nr_of_res > 225){
$nr_of_res = 225;
$nr_of_pages = 9;
}
/*
if($nr_of_res==225){
$nr_of_pages = 9;
}
else{
$nr_of_pages = ceil($nr_of_res/$page_rows);
}
if (!(isset($_GET['page'])))
{
$pagenum = 1;
}
if(isset($_GET['page']))
{
$page_get = $_GET['page'];
if ($page_get < 1)
{
$pagenum = 1;
}
else if ($page_get > $nr_of_pages)
{
$pagenum = $nr_of_pages;
}
else {
$pagenum = $page_get;
}
}
$limit_res = ($pagenum - 1) * $page_rows .',' .$page_rows;
*/
if($search_string == ""){
$nr_of_res = 0;
}
//$nr_of_res = 1; //om localhost
if($nr_of_res > 0){
$ids = array_keys($result['matches']); //om servern
$query = mysqli_query($conn, "select * from allproducts where isbn in(".implode(',',$ids).")"); //om servern
//$query = mysqli_query($conn, "select * from allproducts where isbn = ".$search_string.""); //om localhost
$res_this_page = mysqli_num_rows($query);
$rows = array();
//om servern
while ($row = mysqli_fetch_array($query)) {
$rows[$row['isbn']] = $row;
}
$ordered_rows = array();
foreach($ids as $index) {
$id_float = explode(".", $index);
$index = $id_float[0];
$ordered_rows[$index] = $rows[$index];
}
//om servern
}
$time = microtime();
$time = explode(' ', $time);
$time = $time[1] + $time[0];
$finish = $time;
$total_time = round(($finish - $start), 4);
//echo 'Sökningen tog '.$total_time.' sekunder.';
$result = mysqli_query($conn,"INSERT INTO search_log (query_time) values ('$total_time')");
function pagination_url($i){
$params = $_GET;
$params['page'] = $i;
$paramString = http_build_query($params);
echo "?".$paramString;
}
$pageID="compare-books";
include "../data/scripts/header-tag.php";
?>
-
-
-
Delmar's Mini Guide to Psychiatric Drugs (Pocket)
av Spratto, George R., Ph.D.
ISBN: 9781435487604 - UTGIVEN:
2010-03-01
Focuses on the important drug information used by student nurses in the clinical portion of the psychiatric course, as well as by practicing nurses. From drug actions and interactions, to administration, side effects, and storage, this guide addresses the specialized needs of the psychiatric client.[...]