php-db | 2001062
Date: 06/19/01
- Next message: bryan: "[PHP-DB] products"
- Previous message: Hugh Bothwell: "Re: [PHP-DB] One quick favor!!!!!!"
- In reply to: Jennifer Arcino Demeterio: "[PHP-DB] mssql_fetch_array problem"
- Next in thread: Jennifer Arcino Demeterio: "[PHP-DB] mssql_fetch_array problem"
- Reply: Jennifer Arcino Demeterio: "[PHP-DB] mssql_fetch_array problem"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
try:
if ($country == intval($myrow["countryid"]))
^^^^^^^^
mssql_fetch_array is found to have some weird behavior.
On Tue, 19 Jun 2001, Jennifer Arcino Demeterio wrote:
> hello all,
>
> hope someone could help me ....
>
> it seems that the mssql_fetch_array did not work as it should when the data
> type to be fetch is an integer ... is there any work around for this?
>
> Below is my script ...
>
> $country_sql = "select countryname, countryid from TBL_COUNTRY";
> if ($country_query = mssql_query($country_sql)) {
> while ($myrow = mssql_fetch_array($country_query))
> if ($country == $myrow["countryid"]) {
> print "<option value=" . $myrow["countryid"] . " selected>" .
> $countryid . "</option>";
> } else {
> print "<option value=" . $myrow["countryid"] . ">" .
> $countryid . "</option>";
> }
> }
> }
>
>
> Thanks!
>
>
>
>
-- PGP KEY (GnuPG): http://springboard.dyndns.org/akz/akz.pgp-- PHP Database Mailing List (http://www.php.net/) To unsubscribe, e-mail: php-db-unsubscribe <email protected> For additional commands, e-mail: php-db-help <email protected> To contact the list administrators, e-mail: php-list-admin <email protected>
- Next message: bryan: "[PHP-DB] products"
- Previous message: Hugh Bothwell: "Re: [PHP-DB] One quick favor!!!!!!"
- In reply to: Jennifer Arcino Demeterio: "[PHP-DB] mssql_fetch_array problem"
- Next in thread: Jennifer Arcino Demeterio: "[PHP-DB] mssql_fetch_array problem"
- Reply: Jennifer Arcino Demeterio: "[PHP-DB] mssql_fetch_array problem"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]

