İptal Edildi

Mysql Count Fix

Here is the secure fix.

$dbHost = "DBHOST";

$db = "DBNAMEHERE";

$user = "DBUSER";

$pass = "DBPASS";

$con = new PDO('mysql:host=$dbHost;dbname=$db', $user, $pass);

/*Query1*/

$lastweek = date( "Y-m-d", strtotime ("-2 day" ) ) ;

$prepared = $con->prepare("SELECT Count(*) AS total FROM jobs WHERE DatePosted >= ?");

$newjob_count = $prepared->execute(array($lastweek));

/*Query2*/

$yesterday = date( "Y-m-d", strtotime ("-8 day" ) ) ;

$prepared = $con->prepare("SELECT Count(*) AS total FROM jobs WHERE DatePosted >= ?");

$newweekjob_count = $prepared->execute(array($yesterday));

/*Query3*/

$job_count = $con->query("SELECT Count(*) AS total FROM jobs");

/*Query4*/

$business = $con->query("SELECT Count(*) AS total FROM jobs WHERE PositionType='Business Jobs'");

/*Query5*/

$writing = $con->query("SELECT Count(*) AS total FROM jobs WHERE PositionType='Writing Jobs'");

I removed all of the vulnerabilities as well. All you need to fill in is the dbhost, dbname, dbuser, and dbpass.

If you need anymore help, feel free to contact me. Can you please send the $20?

Beceriler: HTML, Linux, MySQL, PHP, Web Sitesi Testi

Daha fazlasını görün: writing fix, free writing jobs, business writing jobs, pdo, fix mysql query, fix query, pdo mysql, day count, fix array mysql, count mysql, mysql host, mysql contact, host fix, fix vulnerabilities, mysql count, secure mysql, mysql array, mysql tab schedule job, free basic business logo, free submission business directories

İşveren Hakkında:
( 1 değerlendirme ) Loganville, United States

Proje NO: #4450176

0 freelancer bu iş için ortalamada $ teklif veriyor

rkomar

Hired by the Employer

1 gün içinde 30$ USD
(0 Değerlendirme)
0.0