Ready to get started?Download WordPress


Custom Tables
[Plugin: custom tables] Show Multiple table results in a sngle page (5 posts)

  1. BharathRam
    Posted 1 year ago #


    I am using Custom Tables plugin to create three tables based on a primary key. In the search page i have shown the single table results. but when we are directed to the view page after clicking on the results, i want to show the data from all three tables. How can i do that? Please help.


  2. BharathRam
    Posted 1 year ago #

    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

  3. aprietoartwork
    Posted 1 year ago #

    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!

  4. aprietoartwork
    Posted 1 year ago #

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

  5. BharathRam
    Posted 1 year ago #

    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?

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic


No tags yet.