Browse Source

名前空間の参照ちょっと修正

sqlite
みてるぞ 7 months ago
parent
commit
16c99894c7
2 changed files with 15 additions and 11 deletions
  1. +4
    -4
      daos/response.php
  2. +11
    -7
      daos/thread.php

+ 4
- 4
daos/response.php View File

@@ -8,8 +8,8 @@ Response
{
public static function
fetch_all (
SQLite3 $db,
int $thread_id)
\SQLite3 $db,
int $thread_id)
: array
{
$sql = "
@@ -59,7 +59,7 @@ Response

public static function
like (
SQLite3 $db,
\SQLite3 $db,
int $thread_id,
int $response_id)
: void
@@ -79,7 +79,7 @@ Response

public static function
dislike (
SQLite3 $db,
\SQLite3 $db,
int $thread_id,
int $response_id)
: void


+ 11
- 7
daos/thread.php View File

@@ -8,7 +8,7 @@ Thread
{
public static function
fetch_all (
SQLite3 $db)
\SQLite3 $db)
: array
{
$sql = "
@@ -53,8 +53,8 @@ Thread

public static function
find (
SQLite3 $db,
int $id)
\SQLite3 $db,
int $id)
: ?\Dto\Thread
{
$sql = "
@@ -77,6 +77,10 @@ Thread
latest DESC";

$result = $db -> query ($sql);

if ($row === false)
return null;

$row = $result -> fetchArray (SQLITE3_ASSOC);

if ($row === false)
@@ -95,9 +99,9 @@ Thread

public static function
create_thread (
SQLite3 $db,
string $title,
string $explain)
\SQLite3 $db,
string $title,
string $explain)
: void
{
;
@@ -106,7 +110,7 @@ Thread

public static function
delete_thread (
SQLite3 $db,
\SQLite3 $db,
int $id)
: void
{


Loading…
Cancel
Save