Viewing 6 replies - 1 through 6 (of 6 total)
  • Plugin Author john ackers

    (@john-ackers)

    Don’t think I understand what has happened. What does your SQL look like? R U using any PHP snippets?

    Sorry but won’t be able to investigate more until tomorrow PM.

    Thread Starter SEOguruNL

    (@seogurunl)

    I stepped over to writing a function myself using WP shortcodes. Thanks anayway!

    I am getting the same resulte. I have a table with some columns. IE here is my select statement:

    SELECT Contact, City, State, Zip, Phone, Website, Email FROM Dealer_List WHERE StateTerritory LIKE ‘%AK%’

    So I am showing all the contacts that are setup with AK in the table and displayed. I am not sure about PHP Snippts as I didn’t want to insert them. If I run the query I also get the an error message:
    1 rows found.
    ‘name’ is an orphaned PHP snippet. There is no matching column name.
    ‘v1’ is an orphaned PHP snippet. There is no matching column name.
    ‘v2’ is an orphaned PHP snippet. There is no matching column name.
    ‘v3’ is an orphaned PHP snippet. There is no matching column name.

    Where the display shows Contact City State Zip Phone Website Email Name of view Public PHP snippets SQL query

    Except the last 4 I am not calling. If I select the run executed code check box, then I get the following in the last four columns return “” .substr($value,7). ““; $obj = unserialize($value);
    if (gettype($obj) != ‘object’)
    return “”;
    return isset($obj->public) ? “on” : “-“; $obj = unserialize($value);
    if (gettype($obj) != ‘object’)
    return “”;
    return isset($obj->cellFunction) ? count($obj->cellFunction) : “-“; $obj = unserialize($value);
    if (gettype($obj) != ‘object’)
    return(“<span style=’color:lightgrey’>Serialized object from DBView ver < 0.3, please save first.</span>”);
    return esc_textarea(@$obj->query) ;. But I’m not trying to call those in my sql statement.

    Any ideas? Thanks.

    Plugin Author john ackers

    (@john-ackers)

    I think you have clicked on ‘list views’ which loaded that query for editing and then started modifying it. However it has PHP snippets attached to it.

    I would copy your SQL statement. Then start afresh by going into dbview again from the tools menu and pasting your SQL into the box. You should get what you want.

    The fault is mine. There really ought to be a create or new button to prevent this happening. Apologies. Let me know if this doesn’t work.

    If I run the query is displays fine in the WP-Admin, but when I run the shortcode on a page it still displays the extra columns. Is there a way to take out the PHP Snippets? Or remove that from the plugin code?

    Actually, it did display correctly after I resaved it.

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘[Plugin: dbview] Suddenly extra columns in view?’ is closed to new replies.