Ok lets start from the beginning, apologies if this these have been
mentioned previousely I haven't seent the rest of the thread:
* Make sure 'countryid' is spelled the same in your script as it is in
your DB table (I've done this and spent hours banging my head against
a brick wall)
* Ensure they both have the same case.
* Ensure 'countryid' actually contains a value in the DB by looking
it up via the command line or your GUI.
These may sound trivial but think about it, why should some values
return when another does not? What are the differences between the
datatypes that are and are not returned? Compare them and try altering
the differences you find to see what happens.
Good luck!
Russ
On Wed, 20 Jun 2001 13:17:23 +0800 Jennifer Arcino Demeterio
<[EMAIL PROTECTED]> wrote:
> Thanks for all your answers, but, they still seem not to work. In my
> query, the value of countryname is retrieved as expected but the value
> of countryid is not. There seems to be no value retrieved for
> countryid. I am using PHP4 on IIS4 on an NT machine with SQL Server 7
> as the database. "countryname" is of type varchar while "countryid" is
> type int, indentity, auto_increment. I tried listing them by printing
> the resultset but countryid still does not have any value. This could
> be a quirk that some of you experienced and I sure would like to hear
> how you overcame this.
>
> Thanks.
>
> I am posting again the code snippet below:
>
> <?
> $country_sql = "select countryname, countryid from TBL_COUNTRY";
> if ($country_query = mssql_query($country_sql)) {
> while ($myrow = mssql_fetch_array($country_query)) {
> $countryid = $myrow["countryid"];
> $countryname = $myrow["countryname"];
> print "countryid is " . $countryid . " ,countryname is " .
> $countryname . "<br>";
> }
> }
> ?>
>
>
>
>
> --
> PHP Database Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>
#-------------------------------------------------------#
"Believe nothing - consider everything"
Russ Michell
Anglia Polytechnic University Webteam
e: [EMAIL PROTECTED]
w: www.apu.ac.uk/webteam
t: +44 (0)1223 363271 x 2331
www.theruss.com
#-------------------------------------------------------#
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]