Don't like ads? PRO users don't see any ads ;-)
Guest

Untitled

By: a guest on May 8th, 2012  |  syntax: None  |  size: 0.59 KB  |  hits: 9  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. Mysql PHP error when calling table row
  2. if ($_GET['linklabel'] !== '')
  3. {
  4.     $query = "SELECT templateid FROM pages WHERE linklabel = {$_GET['linklabel']}";
  5.  
  6.     $result=mysql_query($query);    
  7.  
  8.     $templateid = $result['templateid'];
  9.  
  10.     echo $templateid;
  11.  
  12.     if ($result !== 0)
  13.  
  14.     {
  15.  
  16.         include($templateid.'.php');
  17.  
  18.     }
  19.  
  20.     else
  21.  
  22.     {
  23.         include('404error');
  24.     }
  25. }
  26.        
  27. $result = mysql_query($query) or die(mysql_error());
  28. $row = mysql_fetch_assoc($result);
  29. $templateid = $result['templateid'];
  30.        
  31. $query = "SELECT templateid FROM pages WHERE linklabel = '{$_GET['linklabel']}'";