|
@@ 288-293 (lines=6) @@
|
| 285 |
|
FROM votes |
| 286 |
|
WHERE (postId = '" . $postId . "' AND device_uid = '" . $deviceUid . "')"); |
| 287 |
|
|
| 288 |
|
if($result === false) |
| 289 |
|
{ |
| 290 |
|
$error = db_error(); |
| 291 |
|
echo $error; |
| 292 |
|
echo "Adding Vote failed: (" . $result->errno . ") " . $result->error; |
| 293 |
|
} |
| 294 |
|
|
| 295 |
|
if($result->num_rows == 0) |
| 296 |
|
{ |
|
@@ 316-320 (lines=5) @@
|
| 313 |
|
$result = $db->query("INSERT INTO votes (device_uid, postId) |
| 314 |
|
VALUES ('" . $device_uid . "','" . $postId . "') "); |
| 315 |
|
|
| 316 |
|
if($result === false){ |
| 317 |
|
$error = db_error(); |
| 318 |
|
echo $error; |
| 319 |
|
echo "Adding Vote failed: (" . $result->errno . ") " . $result->error; |
| 320 |
|
} |
| 321 |
|
|
| 322 |
|
} |
| 323 |
|
|
|
@@ 349-354 (lines=6) @@
|
| 346 |
|
"','" . $device_uid . "','" . $name . "','" . $lat . "','" . $lng . "') "); |
| 347 |
|
|
| 348 |
|
$success = TRUE; |
| 349 |
|
if($result === false){ |
| 350 |
|
$error = db_error(); |
| 351 |
|
echo $error; |
| 352 |
|
echo "Adding account failed: (" . $result->errno . ") " . $result->error; |
| 353 |
|
$success = FALSE; |
| 354 |
|
} |
| 355 |
|
|
| 356 |
|
return $device_uid; |
| 357 |
|
} |