Why doesn't this procedure work?
Posted: Fri Feb 08, 2013 6:26 am
Steven,
I am using the Activity Procedure to test my code as you suggested in another post.
The following code works and displays 2 date fields from each row in the the violations table.
All I did was modify the nuRunQuery by adding 'CREATE TABLE #dataTable#' to give the following:
In the second example, I get nothing when I run the activity procedure.
What am I doing wrong?
John
I am using the Activity Procedure to test my code as you suggested in another post.
The following code works and displays 2 date fields from each row in the the violations table.
Code: Select all
// This works
$resultSet = nuRunQuery("SELECT * FROM violations");
while ($violations_id = db_fetch_object($resultSet)) {
echo "Date 1 - ".$violations_id->vio_date_entered_1.", "."Date 2 - ".$violations_id->vio_date_entered_2."\n";
echo "<br>\n";
}
Code: Select all
// This doesn't work
$resultSet = nuRunQuery("CREATE TABLE #dataTable# SELECT * from violations ";);
while ($violations_id = db_fetch_object($resultSet)) {
echo "Date 1 - ".$violations_id->vio_date_entered_1.", "."Date 2 - ".$violations_id->vio_date_entered_2."\n";
echo "<br>\n";
}
What am I doing wrong?
John