My First Web application .. a real shitty one

My First Web application .. a real shitty one
This commit is contained in:
Muhammad Anas Rashid committed 2016-01-28 23:32:09 +05:00
1 parent 610af7dff3
commit 34753111ed
106 files changed
+41611

No files matched your search

+23
View File
@@ -0,0 +1,23 @@
<?php
require_once("../models/DataAccessHelper.php");
class comment
{
public static function insertComment($imgId,$username, $str)
{
$query ="insert into imgcomments(imgId,username, commentstr) values('$imgId','$username', '$str')";
$result=DataAccessHelper::insertQuery($query);
if($result===TRUE)
{
return true;
}
return false;
}
public static function getComments($imgId)
{
$query="select * from imgcomments where imgId=".$imgId;
$result=DataAccessHelper::executeQuery($query);
return $result;
}
}
?>