comparison php/read/map/getMapRecommPaths.php @ 15:385ddd7c4b55 testing

use test_db.php to get mysqld_test instance
author Henry S. Thompson <ht@inf.ed.ac.uk>
date Sun, 19 Feb 2017 16:17:53 +0000
parents 077b0a0a3e6d
children
comparison
equal deleted inserted replaced
14:1477b5e6dd16 15:385ddd7c4b55
23 } 23 }
24 else{ 24 else{
25 $listName = "MyMap"; //default map 25 $listName = "MyMap"; //default map
26 } 26 }
27 27
28 include "../../../../private/db.php"; 28 include "../../../../../private/db_test.php";
29 //need to have an if statement to catch the first time it is run and call - CALL b_setMapAuthorXYcoord 29 //need to have an if statement to catch the first time it is run and call - CALL b_setMapAuthorXYcoord
30 30
31 //Can swicth to this call if the map is having problems 31 //Can swicth to this call if the map is having problems
32 //Need to CALL b_setMap_RelatedISBNs to create the initial relationships and then 32 //Need to CALL b_setMap_RelatedISBNs to create the initial relationships and then
33 //b_setMap_AllRelatedISBNs b_setMap_relatedISBNs b_setMap_updateRelatedDuplicate 33 //b_setMap_AllRelatedISBNs b_setMap_relatedISBNs b_setMap_updateRelatedDuplicate
43 43
44 if( mysqli_num_rows($results) == 0) 44 if( mysqli_num_rows($results) == 0)
45 { 45 {
46 //populate the data 46 //populate the data
47 mysqli_close($link); 47 mysqli_close($link);
48 include "../../../../private/db.php"; 48 include "../../../../../private/db_test.php";
49 $query1 = "CALL b_setupUserMap($UserID, $loc,\"$listName\")"; 49 $query1 = "CALL b_setupUserMap($UserID, $loc,\"$listName\")";
50 $results1 = mysqli_query($link, $query1) or exit( mysqli_error( $link )); 50 $results1 = mysqli_query($link, $query1) or exit( mysqli_error( $link ));
51 51
52 mysqli_close($link); 52 mysqli_close($link);
53 include "../../../../private/db.php"; 53 include "../../../../../private/db_test.php";
54 // $query = "CALL b_getMap_relatedBooksNPath($UserID, $loc,\"$listName\")"; 54 // $query = "CALL b_getMap_relatedBooksNPath($UserID, $loc,\"$listName\")";
55 $query = "CALL b_getMap_topRelatedBNP($UserID, $loc,\"$listName\")"; 55 $query = "CALL b_getMap_topRelatedBNP($UserID, $loc,\"$listName\")";
56 56
57 $results = mysqli_query($link, $query) or exit( mysqli_error( $link )); 57 $results = mysqli_query($link, $query) or exit( mysqli_error( $link ));
58 } 58 }