On 12/21/05, Anasta [EMAIL PROTECTED] wrote:
Can someone tell me why this select is wrong please---ive tried everything.
the $cat is the tablename .
You've tried *everything* ?
Why do you think it's wrong? Did you get an error message of some kind?
What do you see if you echo $query? Are the
Can someone tell me why this select is wrong please---ive
tried everything.
the $cat is the tablename .
$query= SELECT title FROM $cat WHERE id='$id';
Apparently, either $cat or $id is not the value you think it is. First, I
would try changing
$result=mysql_query($query);
to
[snip]
$query= SELECT title FROM $cat WHERE id='$id';
[/snip]
echo $query; // does it look right to you?
Alway throw an error when in question
if(!($result = mysql_query($query, $connection))){
echo mysql_error() . br\n;
exit();
}
My bet is that you need to concatenate
$query = SELECT
side-question
Jay how come you though concating would give
a different result to interpolation?
/side-question
Jay Blanchard wrote:
[snip]
$query= SELECT title FROM $cat WHERE id='$id';
[/snip]
echo $query; // does it look right to you?
Alway throw an error when in question
if(!($result =
[snip]
side-question
Jay how come you though concating would give
a different result to interpolation?
/side-question
[/snip]
It is not really a different result, it is just something that I am in the
habit of doing. The concat or not to concat question has fueled many a
holy war. I concat,
Jay Blanchard wrote:
[snip]
side-question
Jay how come you though concating would give
a different result to interpolation?
/side-question
[/snip]
It is not really a different result, it is just something that I am in the
habit of doing. The concat or not to concat question has fueled many a
6 matches
Mail list logo