The following warnings occurred: | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Warning [2] Undefined array key "avatartype" - Line: 783 - File: global.php PHP 8.1.31 (Linux)
|
![]() |
Displaying Dynamic Data - Printable Version +- Form Tools (https://forums.formtools.org) +-- Forum: Form Tools (https://forums.formtools.org/forumdisplay.php?fid=1) +--- Forum: General Discussion (https://forums.formtools.org/forumdisplay.php?fid=5) +--- Thread: Displaying Dynamic Data (/showthread.php?tid=153) |
Displaying Dynamic Data - bwaye - May 15th, 2009 I have been using past versions of FT to display dynamic data from FT without any problems for over a year. Are there any new procedures that are required with the new software? I use Dreamweaver for my data connections and have placed very basic code to retrieve and display data to no avail. What is new for me is the use of Code Submissions and FT2. <?php mysql_select_db($database_auction, $auction); $query_Recordset1 = "SELECT * FROM ft_form_1 ORDER BY submission_date DESC"; $Recordset1 = mysql_query($query_Recordset1, $auction) or die(mysql_error()); $row_Recordset1 = mysql_fetch_assoc($Recordset1); $totalRows_Recordset1 = mysql_num_rows($Recordset1); ?> <?php echo $row_Recordset1['f_name']; ?> has bid <?php echo $row_Recordset1['bid']; ?> for seats 1&2 <?php mysql_free_result($Recordset1); ?> RE: Displaying Dynamic Data - Ben - May 16th, 2009 Hi Bwaye, What kind of error messages are you getting? Despite all the changes that came along with FT2, the database structure of the forms table is virtually identical, so queries on that table that worked on FT1 should continue to work with FT2. Try sticking the following line before the mysql_select_db() call: PHP Code: error_reporting(2047); - Ben RE: Displaying Dynamic Data - bwaye - May 16th, 2009 The problem turned out to be that the query contained finalized and unfinalized data. I have just started using the code submission to take advantage of the API's. The issue just surface but was resolved quickly with the following code. This resolved the problem: <?php $colname_auction = "-1"; if (isset($_GET['bid'])) { $colname_auction = (get_magic_quotes_gpc()) ? $_GET['bid'] : addslashes($_GET['bid']); } mysql_select_db($database_auction, $auction); $query_auction = sprintf("SELECT * FROM ft_form_2 WHERE bid > '%s' ORDER BY bid DESC", $colname_auction); $auction = mysql_query($query_auction, $auction) or die(mysql_error()); $row_auction = mysql_fetch_assoc($auction); $totalRows_auction = mysql_num_rows($auction); ?> Thanks for all your hard work!!! |