Re: [PHP] Works from the command line but NOT from PHP

2002-10-02 Thread David Robley

In article [EMAIL PROTECTED], 
[EMAIL PROTECTED] says...
 DonPro wrote:
 
 $queryID = mysql_query(SELECT HSCode, UOM, EDescript FROM HSCodes WHERE
 MATCH(EDescript) AGAINST (' . $description . ') ORDER BY HSCode, UOM,
 EDescript);
 
 I don't see what is wrong but try echoing the text of the query itself 
 and see if it contains what you think it does around the $desription area.
 
 HTH
 Chris

Two bob says this is a register_globals problem

-- 
David Robley
Temporary Kiwi!

Quod subigo farinam

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




[PHP] Works from the command line but NOT from PHP

2002-10-01 Thread DonPro

Does anyone have any experience with FULLTEXT indexed MySQL tables?  I've
created such a key.  When I type the following from the MySQL command line,
I get the desired records returned, i.e., a subset of my entire table:

SELECT HSCode, UOM, EDescript FROM HSCodes WHERE MATCH(EDescript) AGAINST
('exercise');

However, the following PHP code returns the entire table, i.e., every single
column and I don't know why:

$queryID = mysql_query(SELECT HSCode, UOM, EDescript FROM HSCodes WHERE
MATCH(EDescript) AGAINST (' . $description . ') ORDER BY HSCode, UOM,
EDescript);
if ($queryID) {
   while ($queryRow = mysql_fetch_assoc($queryID)) {
  echo '$queryRow[HSCode] . ' | ' . $queryRow[UOM] . ' | ' .
$queryRow[EDescript];
   }
}




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




Re: [PHP] Works from the command line but NOT from PHP

2002-10-01 Thread Chris Hewitt

DonPro wrote:

$queryID = mysql_query(SELECT HSCode, UOM, EDescript FROM HSCodes WHERE
MATCH(EDescript) AGAINST (' . $description . ') ORDER BY HSCode, UOM,
EDescript);

I don't see what is wrong but try echoing the text of the query itself 
and see if it contains what you think it does around the $desription area.

HTH
Chris



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