MYSQL problem

Started on the old forum in November 2010 · view the original in the archive · old links redirect here

#mysql

2 replies · 289 views · started 16 years ago · 1 min read

2 participants
Malka1 Developer · 169 posts #1

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

$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

$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!

i0nutzxp Developer · 150 posts #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'); ?>

Sign in to reply.

Similar topics

Keyboard shortcuts

g f
Go to forums
g h
Go to your feed
g m
Go to messages
r
Reply (in a topic)
/
Search
j
Next post
k
Previous post
?
This list
Ctrl/⌘ + Enter
Send what you are writing
Ctrl/⌘ + B / I
Bold / italic while writing
Esc
Close