Add code to an article to list database articles in a table

Here you can ask or discuss anything else you want...

Add code to an article to list database articles in a table

New postby peterk900 » Fri May 04, 2012 1:27 pm

Hi,

I'm trying to reproduce a hand-crafted web page which includes a table listing records from a MySQL view. I tried pasting the native php code into the article in code view but this I understand is futile !
e.g.
<?php
$con = mysql_connect("00.000.00.00","dbname","dbpwd");
if (!$con)
{
die('Could not connect: ' . mysql_error());
}

mysql_select_db("dbname", $con);

$result = mysql_query("SELECT * FROM vwTrainers4");

while($row = mysql_fetch_array($result))
{
echo $row['FName'] . " " . $row['SName'];
echo "<br />";
}

mysql_close($con);
?>

Can Jumi allow me to include php code which will do this ? If so is there some sample code you can point me towards which would allow this very simple db application to run ?

Thanks

Peter
peterk900
 
Posts: 3
Joined: Fri May 04, 2012 1:09 pm

Re: Add code to an article to list database articles in a ta

New postby Simon » Sun May 06, 2012 3:43 pm

Hello

Sure jumi can do that.

Here is the link: http://2glux.com/projects/jumi/usage-for-j15
User avatar
Simon
Site Admin
 
Posts: 1306
Joined: Wed Jul 13, 2011 8:53 pm

Re: Add code to an article to list database articles in a ta

New postby peterk900 » Wed May 30, 2012 10:12 pm

Thanks Simon - sorry about the delay in looking back at the forum !
peterk900
 
Posts: 3
Joined: Fri May 04, 2012 1:09 pm


Return to Open discussion

Who is online

Users browsing this forum: No registered users and 2 guests