MYSQL problem

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    MYSQL problem

    I wanted to make dynamic titles for my wapsites categories. So i found a function that could do it.


    PHP Code:
    $file_info mysql_fetch_array(mysql_query('SELECT  `id`,`name` FROM `files`'); 
    Basically this code works, but problem is that i get title from 1 id. So it does not take it dynamic for all pages. In fact all pages got ID "1" title. I tried to fix it by adding this code

    Code:
    $file_info = mysql_fetch_array(mysql_query('SELECT  `id`,`name` FROM `files` WHERE `id` = "'.$id.'";'))
    Problem persists, after second function title disappeared.


    Can anybody help me and tell what's wrong with that second function? Maybe i should use anauther one? Thanks!
    Last edited by Malka1; 27.11.10, 14:37.

    #2
    u are sure that the $id variabile has a value ?
    $id = (int)$_GET['id'];
    or
    the $id value exists in files table?
    <?php unlink('World/Europe/Romania.country'); ?>

    Comment


      #3
      Thank you mate, this little peace of code helped me to fix the problem

      Comment

      Working...
      X