The following warnings occurred:
Warning [2] Undefined array key "avatartype" - Line: 783 - File: global.php PHP 8.1.27 (Linux)
File Line Function
/global.php 783 errorHandler->error
/printthread.php 16 require_once
Warning [2] Undefined array key "avatartype" - Line: 783 - File: global.php PHP 8.1.27 (Linux)
File Line Function
/global.php 783 errorHandler->error
/printthread.php 16 require_once
Warning [2] Undefined variable $newpmmsg - Line: 40 - File: global.php(841) : eval()'d code PHP 8.1.27 (Linux)
File Line Function
/global.php(841) : eval()'d code 40 errorHandler->error
/global.php 841 eval
/printthread.php 16 require_once
Warning [2] Undefined array key "style" - Line: 909 - File: global.php PHP 8.1.27 (Linux)
File Line Function
/global.php 909 errorHandler->error
/printthread.php 16 require_once
Warning [2] Undefined property: MyLanguage::$lang_select_default - Line: 5024 - File: inc/functions.php PHP 8.1.27 (Linux)
File Line Function
/inc/functions.php 5024 errorHandler->error
/global.php 909 build_theme_select
/printthread.php 16 require_once
Warning [2] Undefined array key "additionalgroups" - Line: 7162 - File: inc/functions.php PHP 8.1.27 (Linux)
File Line Function
/inc/functions.php 7162 errorHandler->error
/inc/functions.php 5044 is_member
/global.php 909 build_theme_select
/printthread.php 16 require_once
Warning [2] Undefined array key 1 - Line: 1415 - File: inc/functions.php PHP 8.1.27 (Linux)
File Line Function
/inc/functions.php 1415 errorHandler->error
/inc/functions.php 1370 fetch_forum_permissions
/printthread.php 76 forum_permissions
Warning [2] Undefined array key "showimages" - Line: 160 - File: printthread.php PHP 8.1.27 (Linux)
File Line Function
/printthread.php 160 errorHandler->error
Warning [2] Undefined array key "showvideos" - Line: 165 - File: printthread.php PHP 8.1.27 (Linux)
File Line Function
/printthread.php 165 errorHandler->error
Warning [2] Undefined array key "showimages" - Line: 160 - File: printthread.php PHP 8.1.27 (Linux)
File Line Function
/printthread.php 160 errorHandler->error
Warning [2] Undefined array key "showvideos" - Line: 165 - File: printthread.php PHP 8.1.27 (Linux)
File Line Function
/printthread.php 165 errorHandler->error
Warning [2] Undefined array key "showimages" - Line: 160 - File: printthread.php PHP 8.1.27 (Linux)
File Line Function
/printthread.php 160 errorHandler->error
Warning [2] Undefined array key "showvideos" - Line: 165 - File: printthread.php PHP 8.1.27 (Linux)
File Line Function
/printthread.php 165 errorHandler->error



Form Tools
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&amp;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!!!