php class and sql


Hello good people,

I need some help wih php and mySql. My php version is 5 and I have sql database. My issue started when I wanted to make some changes regarding css. I have edited css and uploaded all the files to a new server and suddenly for no reason one php file (class) is not being load. I want to say that I haven’t touched any php, just css and once I put everything back as it was before it stopped working. My database is properly connected, other tables work good. I have one php class and this is the piece of the code.

[php] $sql = “SELECT
“.$this->dbh->{‘dbName’}.”.technicians WHERE “.$field.” = '”.$value."’";

$result = mysql_query($sql);

if (mysql_affected_rows() != 1) {
  $this->error = "User not found.";
else { ..etc etc[/php]

I don;t want to spam with too much code. I am wondering what could have gone wrong if no php code was edited. What actually happend is: I downloaded app files, changed css code and put everything back to server. I would know that my code is wrong but since I haven’t touched it and it was working before why would it stop working now? Does anybody have any idea what could cause app to crash?

Thank you very much in advance!


You said you uploaded the files to a new server? Based on the code you are showing, I would say that your code is too outdated for the server you loaded it onto. Time to update your code base.