Jump to content

odbc fetch array problem


dodgei

Recommended Posts

I'm using odbc fetch array to retrieve data from the database, here is the code,

 

$odbc = odbc_connect ('accounting', 'root', '') or die('Could    Not Connect to ODBC Database!');
$sql = "select * from entry order by EntryID ASC";
  $results = @odbc_exec($odbc, $sql) or die("<tt>problem with $sql : " . odbc_errormsg() . "</tt>\n");

while($r = @odbc_fetch_array($results)) 
{

  
     echo "<tr><td>".$r['EntryID']."</td>";
 echo "<td>".$r['DueDate']."</td>";
 echo "<td>".$r['Merchant']."</td>";
 echo "<td>".$r['Amount']."</td>";
 echo "<td>".$r['Status']."</td>";
 echo "<td><a href=http://www.merediencapital.com/ada/makepay.php?action=pay
&row_id=" . $r['EntryID']."&merchant=". $r['Merchant']."&duedate=".$r['DueDate']."
&amount=".$r['Amount'].">Payment</a></td>";

 

 

The problem is that sometimes the merchant field contains more than one word. When I read that entry it only picks up the first word.

How can I get it to read everything in that field?

Link to comment
https://forums.phpfreaks.com/topic/37169-odbc-fetch-array-problem/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.