Table with one row

i have this table

CREATE TABLE h_f (

header text COLLATE utf8_persian_ci NOT NULL,

footer text COLLATE utf8_persian_ci NOT NULL,

id int(11) NOT NULL AUTO_INCREMENT,

PRIMARY KEY (id)

) ENGINE=MyISAM AUTO_INCREMENT=3 DEFAULT CHARSET=utf8 COLLATE=utf8_persian_ci

i just wana update just one row,i just need one row to read header content or footer content…
i m using this query but dont work u can make it coorect or show other way?

using this
$sql=“update h_f set footer='”.$f.“’ where id='”.$title.“'”;
if (mysqli_affected_rows($conection)>0) {
echo “footer updated”;
}else {
echo “footer didnt updated”;

        }

You’re missing the call to mysql_query, and the call to mysqli_affected_rows isn’t correct.

http://php.net/manual/en/mysqli.affected-rows.php

1 Like

shouldn’t it be… WHERE id = 1

1 Like

holy god,suche … i am

This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.