Re: POST + QUERY
| From: | Brad Bonkoski | Date: | Tue, 27 Mar 2007 21:31:22 +0000 |
| Subject: | Re: POST + QUERY | ||
| References: | 1 2 3 4 5 6 7 8 9 10 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-251496@lists.php.net to get a copy of this message | ||
Dan Shirah wrote:
Here are the results of my print_r Array ( [0] => 121 [1] => Y [2] => DS [3] => **************** [4] => {03} [5] => 500 [6] => *** *[7] => John* [8] => Mark [9] => Doe [10] => 123 My Way [11] => 456 Your Place [12] => Smithville [13] => 12345 [14] => 5432 [15] => 1235550000 [16] => 1235550011 [17] => a@b.com <mailto:a@b.com> [18] => Y [19] => These are the comments [20] => Mar 27 2007 5:26PM [21] => Dan Create [22] => Mar 27 2007 5:26PM [23] => Dan Research [24] => Mar 27 2007 5:26PM [25] => Dan Submit [26] => C [27] => TN ) Bold and in red is the first_name column result. use the numeric reference then...[..] is the index into the array, so if you want "John" use $row_info[7] and if you *want* to use the name or associative array read here: http://www.php.net/manual/en/function.mssql-fetch-array.php -B
On 3/27/07, *Brad Bonkoski* <bbonkoski@mediaguide.com <mailto:bbonkoski@mediaguide.com>> wrote:Sorry, had a typo. *$cc_first = $row_info['first_name']; echo "$cc_first";* this echo returns nothing.Send us the output of print_r($row_info) feel free to mask out any data values you may wish.Dan Shirah wrote:echo $row_info['first_name']; returns nothing. However I have verified the correct spelling both in thedatabase andin the PHP code and they are identical and when I print_r it shows thatthereis a value in the first_name column of the record. On 3/27/07, Zoltán Németh <znemeth@alterationx.hu<mailto:znemeth@alterationx.hu>> wrote:2007. 03. 27, kedd keltezéssel 16.56-kor Dan Shirah ezt írta:
and what does echo $row_info['first_name']; print out? if still nothing, then probably 1) you misspelled the field name and it's not called first_name 2) the field first_name is empty in the row greets Zoltán NémethOn 3/27/07, Dan Shirah < mrsquash2@gmail.com
<mailto:mrsquash2@gmail.com>> wrote:print_r($row_info) display the entire column contents of the select id However, *$first = $row_info['first_name']; echo "$cc_first";* the above echo still returns nothing. On 3/27/07, Davi <davividal@gmail.com
<mailto:davividal@gmail.com>> wrote:Em Terça 27 Março 2007 17:40, Dan Shirah escreveu:
I have echoed something out after virtually every line ofcode :)
When I echo out my result ($result_info) it returns
Resourceid#2
returnsWhen I echo out my row ($row_info) it returns Array When I try to echo out a field from my array($my_info) it
nothingat all.How about: print_r($row_info); ?? -- Davi Vidal davividal@siscompar.com.br
<mailto:davividal@siscompar.com.br>davividal@gmail.com <mailto:davividal@gmail.com> -- Agora com fortune: "<agaffney> I want to be so bleeding edge that I cut myself! <robbat2> agaffney, no, that's just emo <agaffney> Gentoo is emo :P" -- PHP General Mailing List (http://www.php.net/
<http://www.php.net/>)To unsubscribe, visit: http://www.php.net/unsub.php