0

Hi guys;

I am developing a website using joomla. and Im using Chrono Form and ChronoConnectivity extensions for form handling.

So using ChronoConnectivity and I am trying to display some form values. Of course no problem I can display that particular data by using ChronoConnectivity. but I need to display those data in two column.Actually those data containing Names.I need to put those name according their First name A to M in first column and N - Z names are second column

ex-

|Col A | Col B |

| A | N |

| B | O |

| C | P |

| . | . |

| . | . |

| M | Z |


I am try to use while loop for it.

<?php
    //tabela select
    $query2     = "SELECT * FROM `#__chronoconnectivity`" ;
    $count = 1;
    $column = 1;
    //loop statement
    while ($myrow = mysql_fetch_array ($query2))
    {
    // first column display
    if ($column == 1)
    {
    //field is the column in  table

    printf('<div id="agency" class="agencylist"><a href="http://74.54.206.217/~oakpark/index.php?option=com_chronoconnectivity&connectionname=agencydet&cat_id={cf_id}">',$myrow['{text_2}</a></div>']);
    //printf();
    }

    else{
    //second column display
    printf('<div id="agency" class="agencylist"><a href="http://74.54.206.217/~oakpark/index.php?option=com_chronoconnectivity&connectionname=agencydet&cat_id={cf_id}">',$myrow['{text_2}</a></div>']);
    }

    $count += 1;

    $column = $count % 2;
    }
    //loop end
    ?>

I put this code block at under Body: in Connection View Settings.
So result is this error massage.

Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in /../components/com_chronoconnectivity/libraries/connection.php(303) : eval()'d code on line 10

Ok I am agree with you here in my code I had lot of mistake.ok If can tell me either very better way to achieve this my requirement or other proper solution I am so glad.

cheers.

Umanda Jayo Bandara

2
Contributors
2
Replies
3
Views
7 Years
Discussion Span
Last Post by umandajayo
0
$query = "select * from table";
echo $query;
$result = mysql_query($query) or die(mysql_error());

check for specific error message with die statement. echo your query and copy and paste in phpadmin sql editor and execute for results. If the query not returning rows then might be the error.

Edited by rajarajan07: n/a

0

thank you for your reply. but this error massage generated by ChronoConnectivity extension.

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.