comparison php/read/updateLink.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
7 $dir = strval($_GET['dir']); 7 $dir = strval($_GET['dir']);
8 echo $dir; 8 echo $dir;
9 $userID = strval($_GET['userID']); 9 $userID = strval($_GET['userID']);
10 echo $userID; 10 echo $userID;
11 11
12 include "../../../private/db.php"; 12 include "../../../../private/db_test.php";
13 13
14 $pos = 0; 14 $pos = 0;
15 $neg = 0; 15 $neg = 0;
16 16
17 if($change == "pos") 17 if($change == "pos")
63 $stateQuery = "CALL b_insertThumbState($userID,$linkID,$state)"; 63 $stateQuery = "CALL b_insertThumbState($userID,$linkID,$state)";
64 } 64 }
65 echo $stateQuery; 65 echo $stateQuery;
66 66
67 mysqli_close($link); //do not remove. reset is needed otherwise mysqli_fetch_array doesn't work after first loop 67 mysqli_close($link); //do not remove. reset is needed otherwise mysqli_fetch_array doesn't work after first loop
68 include "../../../private/db.php"; 68 include "../../../../private/db_test.php";
69 $stateFinal = mysqli_query($link, $stateQuery) or exit( mysqli_error( $link )); 69 $stateFinal = mysqli_query($link, $stateQuery) or exit( mysqli_error( $link ));
70 } 70 }
71 71
72 //if email not zero, select userid from user where email=email 72 //if email not zero, select userid from user where email=email
73 //insert into thumbstate null,userid,linkid,state (1,0,-1) 73 //insert into thumbstate null,userid,linkid,state (1,0,-1)