php - mysql_num_rows give unexpected result -


I have found the following function:

  public function already @ tweet ($ tweet ) {Return mysql_num_rows (mysql_query ("SELECT * FROM" was tweeted again 'WHERE' tweet` = "$ tweet" ")); }  

Pretty straightforward to check whether a tweet is already present in the database or not.

The following records were in the table:

  id user tweet 3>  

(user is empty for now)

This code:

  $ db_reader = new database_reader; $ Tweeted already = $ db_reader-> gt; Already (tweets); Print $ tweet ". Already:"; Var_dump ((bool) $ has already been tweeted); Print "& lt; br & gt;";  

returns the following output:

  You should also do remarketing. Already: bool (false) View this Tweet. Already: Boole (true)  

I'm very much caught here.

$ Tweet

Similar problem

  • ));

Comments