Viewing 15 replies - 16 through 30 (of 36 total)
  • Thread Starter coleburg

    (@coleburg)

    Thanks, will let you know how I get on ??

    I really appreciate your assistance, its a great plug in I can’t live without

    Plugin Author john ackers

    (@john-ackers)

    Here’s another way of doing this without creating an extra, unwanted column, SQL is:
    select id, concat('https://www.google.co.uk/images/srpr/logo11w.png',',','https://www.google.com') as link from wp_posts limit 2

    PHP is:

    $a = explode(",",$value);
    return "<a href='".$a[1]."'><img src='".$a[0]."' /></a>";

    Thread Starter coleburg

    (@coleburg)

    For your last suggestion I receive

    406 Not Acceptable

    It wont run or return anything.

    thank you

    Plugin Author john ackers

    (@john-ackers)

    It works for me on localhost and shared host. And I cut and pasted the SQL and PHP from the post above.

    Thread Starter coleburg

    (@coleburg)

    hmm, strange, I cant get it to work, doesnt like the concat for some reason, also copied and pasted it. ??

    Thread Starter coleburg

    (@coleburg)

    * I have tried this query directly in the database and it runs ok, it just wont run in DBview

    Thread Starter coleburg

    (@coleburg)

    Yes!!!!

    Got it working with

    select id, ‘https://www.google.co.uk/images/srpr/logo11w.png,https://www.google.com&#8217; as link from wp_posts limit 2

    Concat wouldnt work for some reason so removing it fixed it, I just hope it will work when returning 0 results.

    Thread Starter coleburg

    (@coleburg)

    Bad news, it doesnt like the 0 results. Is there a way to tweak this to not die when there are 0 results as apart from that, its perfect

    Thread Starter coleburg

    (@coleburg)

    here is my site https://www.predictresults.co.uk/full-list-of-football-tips/

    4 Star Home Wins has been updated and has results, but 4 Star Low Scoring (at the bottom) which has 0 results doesnt. Here is the error in DBView

    Warning: array_key_exists() expects parameter 2 to be array, null given in /BLAR BLAR/public_html/wp-content/plugins/dbview/DBViewTable.class.php on line 188

    Warning: Cannot modify header information – headers already sent by (output started at /BLAR BLAR/public_html/wp-content/plugins/dbview/DBViewTable.class.php:188) in /BLAR BLAR/public_html/wp-content/plugins/dbview/DBView.class.php on line 654
    {“success”:false,”messages”:[“0 rows found.<\/span>”,”‘Bet Now’ is an orphaned PHP snippet. There is no matching column name.<\/span>”],”updates”:[{“selector”:”.dbview”,”html”:”
    Low4<\/h2>\r\n\r\n<\/tbody>\r\n<\/table style=’width:98%’>”}],”_ajax_nonce”:”2434ea87f6″}

    Plugin Author john ackers

    (@john-ackers)

    Yep, you are right. Sorry. Will try to commit fix next week. Here is a clue to temp fix

    if (isset($dcols))  // added line
          foreach($this->dview->cellFunction as $name=>$unused) // fyi - ignore orphaned cell names'
    Thread Starter coleburg

    (@coleburg)

    If you could it would be greatly appreciated, its perfect once thats done.

    ps, the code you posted above, is that for the editor? im a little confused.

    thank you

    Plugin Author john ackers

    (@john-ackers)

    Going to check in updated version tomorrow (and with slevit’s changes).

    Thread Starter coleburg

    (@coleburg)

    Thank you ??

    Thread Starter coleburg

    (@coleburg)

    any luck?

    Plugin Author john ackers

    (@john-ackers)

    Are you saying that the update 0.5.3 hasn’t fixed the 0 results issue above?

Viewing 15 replies - 16 through 30 (of 36 total)
  • The topic ‘DB Images’ is closed to new replies.