should use PDO and speed to display data

WooCommerce Multivendor Marketplace – Home Forums WCfM – Feature Request should use PDO and speed to display data

This topic contains 3 replies, has 2 voices, and was last updated by WCfM Forum WCfM Forum 1 week, 2 days ago.

  • Author
    Posts
  • #42469 Reply

    cesar

    Hi there, why you don´t use PDO for access to database? i have searching about this, and wordpress was insterested to implement on 2013, but i’ve serching in the core of 5.0.2 and doesn´t use PDO, so you can implement to access data to your plugin use, meanwhile wordpress catch up.

    Other thing, is the lag to display data on any crud. it’s o lazy.

    my best
    Thanks

  • #42498 Reply
    WCfM Forum
    WCfM Forum
    Keymaster

    Hi,

    Do you want to access WP database from site ?

    Try this plugin – https://wordpress.org/plugins/ari-adminer/

    Thank You

  • #42566 Reply

    cesar

    Not, i mean, every data of vendor/customers site data, are saved in SQLi database, and the connections that you use its just query, one of the most insecure, for other hand, PHP allow use PDO (http://php.net/manual/en/book.pdo.php) that it’s so much more secure, this allow use prepare statement and bindParam to put in the query to database values that you want to ask to DB.
    eg.

    <?php
    $sentencia = $mbd->prepare(“INSERT INTO REGISTRY (name, value) VALUES (:name, :value)”);
    $sentencia->bindParam(‘:name’, $nombre);
    $sentencia->bindParam(‘:value’, $valor);

    // insertar una fila
    $nombre = ‘uno’;
    $valor = 1;
    $sentencia->execute();

  • #42610 Reply
    WCfM Forum
    WCfM Forum
    Keymaster

    Hi,

    Frankly I am not very comfortable with this.

    We use WP standard for this.

    WP DB object “$wpdb” and it supports all this prepare statement, param etc …

    Thank You

Reply To: should use PDO and speed to display data
Your information: