Jump to content

abjones116

New Members
  • Posts

    6
  • Joined

  • Last visited

    Never

Contact Methods

  • Website URL
    http://www.vrmsys.com

Profile Information

  • Gender
    Male
  • Location
    Texas

abjones116's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. @psycho and @jcbones - I'd like to thank you for your help. I was able to solve the problem and learn some new things (from your suggestions). Thank you very much!
  2. Yes - when it is printing the variables from the mysql table to the HTML Table...
  3. Hello All- I am trying to pull some information from a database. I am successfully the information, however, when in the table - the first row of the table (HTML) appears correctly, but any subsequent rows of data on the website are all jammed together on the same row. Hopefully - that makes sense... I was using a printf function but I changed it to see if that was the underlying issue - You will be able to see that with the comments in the HTML. <p><strong>Membership Transaction History:</strong></p> <p> </p> <table style="width: 100%" cellpadding="0" cellspacing="0" align="center"> <tr> <td><strong>Date</strong></td> <td><strong>Transaction ID</strong></td> <td><strong>Method</strong></td> <td><strong>Amount</strong></td> <td><strong>Status</strong></td> </tr> <? /* Get Transactions For Current User */ $t_select = "SELECT * FROM `transactions` WHERE `m_id`='".$sm_id."' ORDER BY time DESC"; $t_result = mysql_query($t_select) or die(mysql_error()); if (mysql_num_rows($t_result)== "0") { echo "</table><br><p align=\"center\">No Transactions Available.</p>"; } else { while($t_row = mysql_fetch_array($t_result)) { $txn_time = $t_row['time']; $date = date('m/d/Y', strtotime($txn_time)); ?> <tr> <td><? echo $date;?></td> <td><? echo $t_row['transaction_id'];?></td> <td><? echo $t_row['method'];?></td> <td><? echo $t_row['amount'];?></td> <td><? echo $t_row['status'];?></td> </tr> <? //$txn_time = $t_row['time']; //$format = "<tr><td>%s</td><td>%s</td><td>%s</td><td>%s</td><td>%s</td></tr>"; //$date = date('m/d/Y', strtotime($txn_time)); //printf($format, $date, $t_row['transaction_id'], $t_row['method'], $t_row['amount'], $t_row['status']); ?></table><? } } ?> I appreciate everyone's help.
  4. I see. Your updates worked. I appreciate your help!
  5. Thanks for the response. Nothing is being returned on the mysql_error() which is throwing me off. Also, before I added another row with m_id = "59" It returned the result correctly. It still returns two rows of the same data as well, but there is different data it should be returning.
  6. Hello All, I am trying to pull multiple transactions from the database. I used the code below and it worked with only one resource it was returning from the database meeting those parameters. When I added another row of data to the database with the same parameters I received the following error: The DB Connection is fine. I added the die mysql_error() however no error is be retrieved on the page. It also has looped the same data twice but only the first result and not the second as intended. I appreciate any help
×
×
  • 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.