Help php trasnfer pdo

03/29/2015 12:18 Appius4S#1
PHP Code:
 $sql0 "SELECT title FROM tickets WHERE hash = '".$hash."' AND Solved = 0";
                            
$q0 $web->prepare($sql0);
                            
$q0->execute(); 
                            
$q0 mysql_query($sql0);

                            
$dat0 mysql_fetch_assoc($q0);
                            
$title $dat0['title'];

                            if(
mysql_num_rows($q) != || mysql_num_rows($q0) != 0
is 20% trasnfer to pdo ... who can help me with the rest of script ?
03/29/2015 12:42 Analysis'#2
[Only registered and activated users can see links. Click Here To Register...]
03/29/2015 13:00 Kentika#3
PHP Code:
$stmt $web->prepare('SELECT title FROM tickets WHERE hash = :hash AND Solved = 0');

if(
$stmt->execute([':hash' => $hash]) {
   
$result $stmt->fetch(); // Fetch 1 row // fetchAll for all rows
   
$title = isset($result['title']) ? $result['title'] : null;

   if(!
is_null($title)) {
       [...]
   }

Read the manual.