Re: important plz help me
From: Lew Pitcher <lew.pitcher_at_digitalfreehold.ca>
Date: Wed, 06 Dec 2017 12:07:08 -0500
Message-ID: <p0983u$9k0$1_at_dont-email.me>
Date: Wed, 06 Dec 2017 12:07:08 -0500
Message-ID: <p0983u$9k0$1_at_dont-email.me>
dhanya_at_icfoss.in wrote:
> $query3='UPDATE malayalam SET tags='.$c[$x].' WHERE sent='.$a[$x].'';
> print_r($query3);
> mysql_query($query3) or die('Error update querying database.');
>
> Not updating database
- the "mysql_" functions/classes were deprecated in PHP 5.5.0, and removed in PHP 7.0.0 - you probably should use the "mysqli_" calls or the "PDO" calls instead.
- For INSERT, UPDATE, DELETE, DROP, etc, mysql_query() returns TRUE on success or FALSE on error. You should test the return value from mysql_query() and take some remedial or reporting action. At least...
- Call mysql_error() when your mysql_query() call returns FALSE. This will tell you /why/ the query failed.
-- Lew Pitcher "In Skills, We Trust" PGP public key available upon requestReceived on Wed Dec 06 2017 - 18:07:08 CET