Hi Hendrik,
I don't have access to the source for the URL that I pointed you to
just at the moment. However, below is a very similar PHP script I'm
using elsewhere.
<?php
header("Content-Type: application/json; charset=utf-8");
$dbuser="???";
$dbpass="???";
$dbname="???"; //the name of the database
$chandle = mysql_connect("???.com", $dbuser, $dbpass)
or die("Connection Failure to Database");
mysql_select_db($dbname, $chandle) or die ($dbname . " Database not
found. " . $dbuser);
$query1 = "
SELECT
name,
project_name,
project_status_name,
long_name,
owner,
release_number,
build_number
FROM table1
order by name
;";
$result = mysql_db_query($dbname, $query1) or die("Failed Query of " .
$query1); //do the query
$i = 0;
echo "{";
echo "properties:{event_url:{label:'event_url',valueType:'url'}},";
echo "\"items\":[";
while($thisrow=mysql_fetch_row($result))
{
if($i > 0) echo ",";
echo "{
label:\"".trim($thisrow[0])."\",
project_name:\"".trim($thisrow[1])."\",
project_status_name:\"".trim($thisrow[2])."\",
long_name:\"".trim($thisrow[3])."\",
owner:\"".trim($thisrow[4])."\",
release:\"".trim($thisrow[5])."\",
build:\"".trim($thisrow[6])."\"
}";
$i++;
}
echo "]}";
?>
HTH,
-Mark
On Mar 10, 5:47 pm, Hendrik <[email protected]> wrote:
> Hi Mark,
>
> Could you give example code what you've done in php code? I interested
> with your approach, because I need to use Exhibit with the original
> data source come from the result of SPARQL query which in an array.
>
> Thanks and regards,
> Hendrik
>
> On Mar 11, 12:53 am, mleden <[email protected]> wrote:
>
> > Hi Angelia,
>
> > I do something similar (PHP transforming raw MySQL data). The only
> > differences are that I am using Exhibit plus Timeline extension & JSON
> > while it sounds like you're using Timeline standalone & XML.
> > Bottomline, it was surprisingly easy to feed the data straight in via
> > the PHP script.
>
> > The key entry in the markup is as follows:
> > <link href="../php/your_php_script.php" type="application/json"
> > rel="exhibit/data" />
>
> > You can see an example at:www.thisbeautifulgame.com
>
> > HTH,
> > -Mark
>
> > On Mar 10, 6:05 am, - Angelia - <[email protected]> wrote:
>
> > > Hi,
>
> > > I am currently trying on SIMILE timeline. In the original
> > > example, I can load an XML file ("example1.xml") as the content of the
> > > timeline.
> > > But now, I am retrieving data from mySql by using PHP. And
> > > the I display like exactly the same format as the XML file. How can I
> > > call the XML look PHP script ("http://localhost/connect.php") to load on
> > > the timeline?
> > > Please advice.
> > > Thank you.
>
> > > Regards,
> > > Angelia
> > > _________________________________________________________________
> > > Hotmail: Trusted email with powerful SPAM
> > > protection.https://signup.live.com/signup.aspx?id=60969
--
You received this message because you are subscribed to the Google Groups
"SIMILE Widgets" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/simile-widgets?hl=en.