I was wondering if you can connect to the same database multiple times? I have been trying the following with no luck. And, yes permissions are set so I can write to the database.. My problem is I keep getting the error: "Warning: 2 is not a valid ODBC result resource in c:\inetpub\wwwroot\hdtvpub\getinfo\1.php on line 4"
- $connectionstring = odbc_connect("customdigi", "", "");
- $Query = "SELECT Hyperlink, EntryNumber, Site FROM TVlistings";
- $queryexe = odbc_do($connectionstring, $Query);
- while(odbc_fetch_row($queryexe)) {
- $Hyperlink = odbc_result($queryexe, 1);
- $EntryNumber = odbc_result($queryexe, 2);
7.
- // More code
- $connectionstring2 = odbc_connect("customdigi", "", "");
- $Query2 = "UPDATE TVlistings SET Price = $price WHERE Hyperlink LIKE '$Hyperlink'";
- $queryexe2 = odbc_do($connectionstring2, $Query2);
- odbc_close($connectionstring2);
- }
- odbc_close($connectionstring);