| @@ 289-293 (lines=5) @@ | ||
| 286 | $result = $db->query("INSERT INTO votes (device_uid, postId) |
|
| 287 | VALUES ('" . $device_uid . "','" . $postId . "') "); |
|
| 288 | ||
| 289 | if($result === false){ |
|
| 290 | $error = db_error(); |
|
| 291 | echo $error; |
|
| 292 | echo "Adding Vote failed: (" . $result->errno . ") " . $result->error; |
|
| 293 | } |
|
| 294 | ||
| 295 | } |
|
| 296 | ||
| @@ 322-327 (lines=6) @@ | ||
| 319 | "','" . $device_uid . "','" . $name . "','" . $lat . "','" . $lng . "') "); |
|
| 320 | ||
| 321 | $success = TRUE; |
|
| 322 | if($result === false){ |
|
| 323 | $error = db_error(); |
|
| 324 | echo $error; |
|
| 325 | echo "Adding account failed: (" . $result->errno . ") " . $result->error; |
|
| 326 | $success = FALSE; |
|
| 327 | } |
|
| 328 | ||
| 329 | return $device_uid; |
|
| 330 | } |
|