Forums

Display on screen informations of table mysql

loul1933 04 Mar, 2011
Good morning and thank's for your site

in first sorry for my English, i am a "frenchy"

My problem :

i hope to display, on screen joomla, informations from a mysql table

i have do this with your tutoriel (Greahead) of Chronoconnectivity it work very well, but i want to display only some informations who are selected by a selective formulaire chronoform, and return and display this selective informations on the screen over a form chronoform

Please tell me if is it possible and if yes, how to make that

another time SORRY for my english (i have leave my scolair book in 1964 !!!!!....)

and Thanks you for your response

JLB
GreyHead 04 Mar, 2011
Bonjour JLB,

The Static & Dynamic Filters tutorial will show you how to filter a ChronoConnectivity listing using the WHERE box. That should be straight-forward.

It may be possible to show the listing over a form if you place the form in a Module on the page, otherwise this is more difficult.

What exactly do you want the form to do?

Bob
loul1933 04 Mar, 2011
Hello Bob and Thank's

My problem:
I have make a joomla site (first in local to learn the product) it is a site Club of cyclotourist and we have a table mysql with 4 columns : Numero, Kilometre, Parcours(route) (in details) and a link for another site 'operunner' (on this site, the route is display on a map)

i have make a form chronoconnectivity with a box filter and clear as soon as it is explain in the tutoriel but

My wish is :
1 The visitor of site perform a form chronoform (ex 'all circuit of 50 kms, or all circuit of 50kms and with a name of town on the route etc etc) in brief a form multi-choice

2 build an access on base to take record adequat

3 display tyhe responses on the page (the return-form is only to embellish the display on the screen)

if it is possible to build form chronoconnectivity dynamickly and use it automatically after ????

Encore merci beaucoup de votre aide

how-to ,in return of selection ,display a url address "clickable" on the screen (ref of my column "openrunner" it is an url)
loul1933 04 Mar, 2011
How Bob,

Dont take time to response,
I have discovery your tuto to 'dynamic' and i am going to test it
if it is OK i tell you on the topic

Sorry
1 for my bad english
2 for my "non-loock" of the tuto

a+
JLB
loul1933 24 Mar, 2011
Good morning Bob, (I translate my French into English since Reverso)

I set up chronoconnectivity with your tutoriel of display table dynamic mysql he(it) rest me 2 problems...

Context touring cyclists' site with BDD of route(course) velo
A table with 3 columns Km, detailed Routes(Courses) and column of link towards another site

The display of 3 columns is OK but I would like to return the link ( the third clycable column).

I tried to put the tag < has href = " and /a> between the td of my third column in body, but it do not display the information (blank column), would you have an idea?

and the second pb : when i try to select the road of 100kms, it return the information, but if the display is more than one page, when i click on "page 2" or "suivant", it display the second page of the all informations of my table ???

i hope you understand my "charabia" i am in wait of your response

Thank's in advance

Jean Louis
GreyHead 24 Mar, 2011
Bonjour Jean Louis,

Please post a link to the listing so we can take a quick look.

There is another thread here about pagination problems with some JavaScript fixes it it. Please look in the ChronoConnectivity forum.

Bob
loul1933 24 Mar, 2011
Bonsoir Bob,

i can't make a link to the code because the site is on my computer but i have put the différents scénario and the code of my chronoconnectivity
I would want that the zone 3 is clikckable so that the Internet users visualize(display) the route(course)

1) if the third column of my table mysql(openrunner) content
<a href="http://www.openrunner.com/index.php?id=798577"  /a>


Result (the "|" character séparate columns in result of chrnoconnectivity)

KMS | PARCOURS | OPENRUNNER
45 | La Brède Saint Selve Castres Portets Arbanats Virelade Podensac (par route du bas) Illats Saint Michel de Rieuffret Grenade Saint Morillon La Brède |
50 | La Brède Saint Selve Castres Portets Langoiran Cadillac Cérons Illats Saint Michel de Rieuffret Grenade Saint Morillon Le Reys La Brède |



2) if the third column content
http://www.openrunner.com/index.php?id=798577


Result

KMS | PARCOURS | OPENRUNNER
45 | La Brède Saint Selve Castres Portets Arbanats Virelade Podensac (par route du bas) Illats Saint Michel de Rieuffret Grenade Saint Morillon La Brède | http://www.openrunner.com/index.php?id=798577



this is the code for my chronoconnectivity (a copier/coller of your code with my variables)
WHERE SQL

<?php
$kilom = JRequest::getString('kilom', '', 'post');
if ( $kilom ) {
  echo " WHERE `kms` = $kilom ";
}
?>


HEADER
<?php
// get the number of records returned
$db =& JFactory::getDBO();
global $count;
$count = $db->loadResult();

// add style & script snippets
$style = $script = "";
$style .= "
table.cf_listing {
margin-bottom: 12px;
}
";

$script .= "
$('clear').addEvent('click', function() {
  $('kilom').value = '';
});
";
$doc =& JFactory::getDocument();
if ( $script ) {
  $script = "window.addEvent('domready', function() { $script });";
  $doc->addScriptDeclaration($script);
}
if ( $style) {
  $doc->addStyleDeclaration($style);
}
// get the previous filter string
$kilom = JRequest::getString('kilom', '', 'post');

?>

<!-- display the filter box and buttons -->
<input type='text' name='kilom' id='kilom' value='<?php echo $kilom; ?>' /> <input type='submit' name='filter' id='filter' value='Quelle distance ?' /> <input type='button' name='clear' id='clear' value='Effacer le champs de selection' />

<!-- start the listing table -->
<table class='cf_listing'>

<?php
// check if there are any records returned
if ( !$count ) {
   // no records - show the message
   echo "<div>Désolé retour $count Cette distance est inconnue dans la base.</div>";
} else {
echo "<div>Nombre de résultats trouvés : $count</div>"; 
   // some records, show the header & footer rows
?>

  <thead>
    <tr>
       <th style='width:20px;'>KMS</th>
       <th style='width:5px;'>|</th>
       <th style='width:650px;'>PARCOURS</th>
       <th style='width:5px;'>|</th>
       <th style='width:300px;'>OPENRUNNER</th>
    </tr>
  </thead
  <tfoot>
   <tr>
      <td colspan='5' style='background:green; height:5px;'></td>
   </tr>
  </tfoot>

<?php
}
?>

<tbody>


BODY

<tr><td>{kms}</td><td>|</td><td>{par}</td><td>|</td><td>{ope}</td></tr>



I have try this

<tr><td>{kms}</td><td>|</td><td>{par}</td><td>|</td><td><a href="{ope}" /a></td></tr>


the result is like 1)


FOOTER
</tbody>

</table>

<?php
// visualiser ou non la pagination selon le resultat
global $count;
if ( $count ) {
?>
{pagination}
<?php
}
?>

and i read the forum for the pagination problem

Very thank's to you

JL
loul1933 25 Mar, 2011
Sorry,

But i have not make BBCODE off in my response and the result 2 is not reel, the HTTP..... in my screen of chronoconnectivity is not a lynk like in my response !!

Nice day

JLB
GreyHead 25 Mar, 2011
Hi Jean Louis,

An <a> tag needs to be like <a...>XXX</a> and have some content to display
<tr><td>{kms}</td><td>|</td><td>{par}</td><td>|</td><td><a href="{ope}" >Ajouter quelque chose ici</a></td></tr>


Bob
loul1933 25 Mar, 2011
SUPER BOB,

<tr><td>{kms}</td><td>|</td><td>{par}</td><td>|</td><td><a href="{ope}" >Ajouter quelque chose ici</a></td></tr>

i have put {ope} at place of "Ajouter quelque chose ici" and IT'S WORK

my html langage is like my english (bad and old)

Thank's for your reactivity

i am reading the forum 'pagination' to resolve my last pb

Another Thanks

Jean Louis
This topic is locked and no more replies can be posted.