Discussion:
JOIN Command Runs Fine in phpMyAdmin, but Hangs when Run in PHP?
(too old to reply)
Vik Rubenfeld
2007-08-18 01:08:53 UTC
Permalink
select * from metal_desc join abbrev on metal_des.ndb_no =
abbrev.ndb_no where long_desc like 'copper' order by long_desc
I ran it in the phpMyAdmin Query window, and it ran perfectly, and came
back with the correct results.
...it seems to halt PHP execution. The next line of PHP code never runs.
It's like PHP or MySQL is hanging.

Checking the server error logs for PHP, MySQL, and Apache, shows no
errors.
select * from metal_desc where long_desc like 'copper' order by
long_desc
...everything runs perfectly.

Does anyone have any notion what could be causing this?

Thanks very much in advance to all for any info.
Vik Rubenfeld
2007-08-18 18:04:09 UTC
Permalink
It was because the fields weren't indexed. I indexed them and it works
now.

It's odd that the exact same Join query ran immediately in phpMyAdmin
before the fields were indexed. Hmmmm......

Loading...