WordPress.org

Support

Support » Plugins and Hacks » custom tables » [Plugin: custom tables] Show Multiple table results in a sngle page

[Plugin: custom tables] Show Multiple table results in a sngle page

Viewing 4 replies - 1 through 4 (of 4 total)
  • to be precise,
    i have three tables.

    table 1: has the user name and email
    table 2: has user address and phone number
    table 3: has other details.

    So what i want to do is, when we click on the search results, i want the view page to show the output from all three tables. that is,

    if the search result is,

    name: xyz email: xyz@xyz.com

    and when clicking on it, the output should be,

    name: xyz
    email: xyz2xyz.com
    phone: blah blah
    other details: blah blah

    please help me on this

    You need to condense all that information into one table. Is there a specific reason why you would want that information separated?

    your table should look like so:

    usrname | email | address | phone# | details
    Joe | joe@blah.com | 123 joe street | 1234567 | jibberish

    You would conduct your search like so: If for example you were searching only the “usrname” field. Be sure to change the wctable id number to the # of your specific table. This should be in the content of a page or post.

    [wctsearch fields=”usrname”]<?php
    if ($_GET[‘wcts’] != ” OR $_GET[‘s’] != ”) {
    echo do_shortcode(“[wctable id=\”5\”]”);
    }
    ?>

    To display the results you would like, go to the plugin, click on your table then View Setup>Entry Setup.

    For example:
    Name: {name}
    Phone: {phone}
    Email: {email}

    Text you want before field result: {name of field/results}

    This should get you started, thanks!

    Please install the plugin Exec-PHP so you can use PHP in pages/posts.

    Thanks for your reply. It helped me a lot. But the reason for having separate tables is that I am building a membership directory. So i want to sort all data out.

    I want to get the data from table 2 and 3 with the primary key of table 1.
    Can you please help me out with this?

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘[Plugin: custom tables] Show Multiple table results in a sngle page’ is closed to new replies.
Skip to toolbar