--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
RE: Pull Down Menu with ODBC query
am 11.08.2008 22:42:49 von kitfox69
BTW I want to make sure I am doing this correctly...
with that current script (edited below with your fix) will I be able to pass that selection on into a further PHP page? I do not see how without assigning a variable to it and passing it with POST... how would I go about this?
-------------- Original message ----------------------
From: "Simcha"
>
> odbc_fetch_array() returns an associative array, so will you need to use
> $row[' sls_his_cust_id'] instead of $row[0].
>
>
>
> -----Original Message-----
> From: kitfox69@comcast.net [mailto:kitfox69@comcast.net]
> Sent: Monday, August 11, 2008 10:14 PM
> To: php-db@lists.php.net
> Subject: [PHP-DB] Pull Down Menu with ODBC query
>
> I am having trouble getting this script to populate the query data into a
> pull down menu.
>
> The SQL script works fine and displays the data with odbc_result_all but
> will not put it in the menu.
>
> Script is as follows:
>
>
> $conn = odbc_connect("HOMES", "", "");
> $billdate = $_POST[ 'billdate' ];
> $query = ("SELECT DISTINCT sls_his_cust_id FROM sls_his where
> sls_his_prchdat_alt = $billdate");
> $result = odbc_exec($conn, $query);
>
> echo "";
> ?>
>
> Any ideas?
>
> --
> PHP Database Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
> No virus found in this incoming message.
> Checked by AVG - http://www.avg.com
> Version: 8.0.138 / Virus Database: 270.6.0/1604 - Release Date: 11/08/2008
> 05:50
>
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
The last two responses I got were great and worked. However I stuck with my original script with the small $row fix presented earlier and it works great.
The only problem I see with the last two are that there is no scripting to push to the next page like I have set.
I need to be able to pass the selected CUSTID on to this page so I can display all the data pertinent to that customer... also I would like to be able to use the billdate that was present earlier but am not sure how to push it through again...
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php