1
mirror of https://github.com/jakejarvis/spoons.git synced 2025-06-29 07:55:40 -04:00

log all SMS messages/responses into database (note creation of new 'texts' MySQL table! included in updated db_structure.sql)

This commit is contained in:
2013-05-27 00:51:06 -04:00
parent 7dcf5a2aff
commit 65578fb1e4
3 changed files with 21 additions and 21 deletions

View File

@ -1,5 +1,9 @@
<?php
function logSMS($message, $response, $number) {
mysql_query('INSERT INTO texts (message, response, phone_number) VALUES ("' . mysql_real_escape_string($message) . '", "' . mysql_real_escape_string($response) . '", "' . mysql_real_escape_string($number) . '")');
}
function getNumTotalSpooners() {
$result = mysql_query("SELECT id FROM spooners");
return mysql_num_rows($result);