コード例 #1
0
ファイル: model.php プロジェクト: k-lusine/guessgame
 public static function newWord()
 {
     $newWordID = self::getRandomID();
     $sql = "SELECT * FROM word WHERE ID={$newWordID}";
     $result = dbConnect::runSQL($sql);
     $word = $result->fetch_assoc();
     $wordLetters = str_split($word['word']);
     $word['wordLetters'] = $wordLetters;
     return $word;
 }