Digital Workshop

Welcome to the Digital Workshop Message Boards
It is currently October 15th, 2024, 3:20 am

All times are UTC [ DST ]




Post new topic Reply to topic  [ 1 post ] 
Author Message
 Post subject: PHP Script
PostPosted: June 26th, 2006, 2:34 pm 
Offline

Joined: August 22nd, 2005, 11:56 am
Posts: 125
Location: The Netherlands
Opus: Pro 9.75 (Build 16749)
OS: Windows 10 Pro 64-bit
Hello All,

I have created the following PHP script which always returns more than one record with 3 fields per record...

Code:
<?php

$DBhost = $_POST['DBhost'];
$DBname = $_POST['DBname'];
$DBuser = $_POST['DBuser'];
$DBpass = $_POST['DBpass'];

$connect = mysql_connect($DBhost,$DBuser,$DBpass);
$db = mysql_select_db($DBname,$connect);

$query = "SELECT CREW.Name, CREW.Service, RANK.Rank";
$result = mysql_query($query, $connect);
$Crew_Number = mysql_num_rows($result);
echo "&Crew_Number = " . $Crew_Number;

while ($row = mysql_fetch_array($result))
{
   $FinalData =
   "&CREW_Name = " . $row['Name'] .
   "&CREW_Service = " . $row['Service'] .
   "&CREW_Rank = " . $row['Rank'];
   echo $FinalData;
}

mysql_close($db);

?>


This works fine when running the script on my webserver, but how can I display the data, record by record in my Opus Pro 5.5 publication.
For one record it is no problem when I use the Post Web Data action applied at a On Show trigger, but how do I get all the records one by one?!
Any help is highly appreciated...

Jan


Top
 Profile Visit website  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 1 post ] 

All times are UTC [ DST ]


Who is online

Users browsing this forum: No registered users and 4 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group