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]
|