why
                '.$table.'
and not
                '".$table."'
with what you've got now, I believe you are looking for
                .table name.
instead of
                table name
and if your table name is only one word, a good practice I'm told, ditch the
' and " marks entirely
and just use
                ...FROM $table WHERE...
also, use double quotes for start and end of variables as in:
                $sql="select * from '".$table."' where var='some value other
than a number' ";

Hope this helps
Hugh

"We have met the enemy and they is us!" Pogo





----- Original Message -----
From: "John Taylor-Johnston" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Tuesday, December 03, 2002 10:28 PM
Subject: Re: [PHP] Whimper, help :)


>
http://ccl.flsh.usherb.ca/print/print.html?search=%26quot%3Bready+maria%26qu
ot%3B
>
http://ccl.flsh.usherb.ca/print/index.html?search=%26quot%3Bready+maria%26qu
ot%3B
>
> I blame PHP. Can't be MySQL.
> echo $sql displays the EXACT same thing.
>
> Debugging ... Works jdaxell.ccl = 2 records found:
> $sql = 'SELECT id,AU,ST,BT,AT FROM '.$table.' WHERE MATCH
> (TNum,YR,AU,ST,SD,BT,BC,AT,PL,PR,PG,LG,AUS,KW,GEO,AN,RB,CO)
> AGAINST (\'"ready maria"\' IN BOOLEAN MODE) ORDER BY id asc';
> http://ccl.flsh.usherb.ca/print/display.test.inc.phps
>
>
> Doesn't work - Resembles +ready +maria
> $sql = "SELECT id,AU,ST,BT,AT FROM $table WHERE MATCH
> (TNum,YR,AU,ST,SD,BT,BC,AT,PL,PR,PG,LG,AUS,KW,GEO,AN,RB,CO)
> AGAINST ('".stripslashes($search)."' IN BOOLEAN MODE) ORDER BY id asc";
> http://ccl.flsh.usherb.ca/print/display.table.inc.phps
>
> Doesn't work - Resembles +ready +maria
> $sql = "SELECT id,AU,ST,BT,AT FROM ".$table." WHERE MATCH
> (TNum,YR,AU,ST,SD,BT,BC,AT,PL,PR,PG,LG,AUS,KW,GEO,AN,RB,CO)
> AGAINST ('".stripslashes($search)."' IN BOOLEAN MODE) ORDER BY id asc";
> http://ccl.flsh.usherb.ca/print/display.table.inc.phps
>
>
> Doesn't work - Resembles +ready +maria
> $sql = 'SELECT id,AU,ST,BT,AT FROM '.$table.' WHERE MATCH
> (TNum,YR,AU,ST,SD,BT,BC,AT,PL,PR,PG,LG,AUS,KW,GEO,AN,RB,CO)
> AGAINST (\''.stripslashes($search).'\' IN BOOLEAN MODE) ORDER BY id asc';
> http://ccl.flsh.usherb.ca/print/display.table.inc.phps
>
>
> :0
> John
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to