You are here: select count(*) > foobar « PHP « IT news, forums, messages
select count(*) > foobar

Posted by - on 01/31/05 03:50

i have a query as follows and is unsure whether it is mysql or php:

$result = mysqli_query("SELECT COUNT(*) > @foobar AS status ....") where
it's suppose to get a one row value of either '0' or '1' (false or true)

if i were to do a SELECT COUNT(*) FROM...
i can use the php $row["COUNT(*)"] to refer to the index.

if i were to do a SELECT COUNT(*) AS status FROM...
i can use the php $row["status"] to refer to the index.

but in this case SELECT count > @foobar AS status,
refering to $row["status"] gives a empty value. however, running the
same query in mysql command prompt produces

+------+
|status|
+------+
| 1 |
+------+

php doesn't support such select statement? even array_keys($row) returns
empty.

anybody knows how to solve it? thank you very much.

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация