Okay
  Public Ticket #1799374
Layserslider Wordpress error syntax
Closed

Comments

  • galaktikmel started the conversation

    Hello 

    i am writing because i have a problem with layerslider 

    here is my mistake :

    You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ''wp_anewsitelayerslider' WHERE flag_hidden = '0' AND flag_deleted = '0' ORDER BY' at line 1]
    SELECT * FROM 'wp_anewsitelayerslider' WHERE flag_hidden = '0' AND flag_deleted = '0' ORDER BY id ASC

    and second error  see attachment 

    error line 5  : undefined index lslider layerslider

    Can you help me please.

    it's urgent.

  • [deleted] replied

    Hello galaktikmel,

    Thank you for getting in touch with us. My name is Attila and I'm happy to assist you today. I appreciate your patience while we've been working towards your ticket.

    Could you please show us your site or a test page with the slider where we can check on this to see what might be happening ?

  • galaktikmel replied

    Hi, 

    Goog evening, here is the link of the site 


    http://www.institutrembel.fr/NEWsiteJR/test-layerslider/


    Currently i use plugin slider revolution on Homepage : http://www.institutrembel.fr/NEWsiteJR/

    But i want to use layerslider.


    i bought the layer slider plugin but it gives me an error : undefined in index : lslider.  (add attachment)


    thank you can you help me.


    Bast regards 


    Melanie


  • [deleted] replied

    Thank you. I'll let the dev team look into this to see what they can find, and get back to you shortly.

  • galaktikmel replied

    hello, 

    This si new url to reproduce bug 

    http://www.institutrembel.fr/test-layerslider/


    Thank you so much. 


  • [deleted] replied

    The dev team looked into this and the problems you are mentioning are not caused by the plugin. The errors are coming from your own custom code that you wrote, there are some mistakes in it. None of the errors are related to LayerSlider directly, they are general programming mistakes.

    For the sake of clarity, to use our product you do not need such things. But if you are a developer and working on some custom solution, we can help you with that. But please note that we can only answer questions related to the plugin.

    Regarding the MySQL issue, you will need to remove the apostrophes from the start and end of the table name (wp_anewsitelayerslider).

    Also, you do not need to write your own MySQL query, you can use LayerSlider's functions: 

    $sliders = LS_Sliders::find( array(
        'limit' => 100
    ));

    Here you can find more information about it: https://layerslider.kreaturamedia.com/developers/#sliders

    Regarding the undefined index notice, you will need to check whether the $params['lsslider'] variable exists, using the isset() or the empty() PHP functions. Like this:

    if( ! empty( $params['lsslider'] ) ) {
        // ...
    }