Search
 
SCRIPT & CODE EXAMPLE
 

PHP

magento2 join table with prefix

function getColumns($table,$prefix)
{
    $resource = $GLOBALS['obj']->get('MagentoFrameworkAppResourceConnection');
    $connection = $resource->getConnection();
    $sql = "SHOW COLUMNS FROM `$table`;";
    echo $sql;
    $result = $connection->fetchAll($sql);
    $columns = array();
    for ($i = 0; $i < count($result); $i++) {
        array_push($columns,$result[$i]['Field']." as ".$prefix.$result[$i]['Field']);
    }
    return $columns;
}
Comment

PREVIOUS NEXT
Code Example
Php :: php endif endforeach endwhile 
Php :: number format rupiah 
Php :: SMARTY compose variable key array 
Php :: if Offset php 
Php :: leaf php 
Php :: IlluminateValidationRulesRequiredIf 
Php :: laravel route group within a group 
Php :: Add class to menu anchors 
Php :: Trying to get property 
Php :: codeigniter 4 query builder select 
Php :: php order array by specific key 
Php :: trim | from right in php 
Php :: php string filter email 
Php :: woocommerce check if shop page 
Php :: how to store array in variable php 
Php :: last insert id in laravel 
Php :: what does = mean in php 
Php :: create a product stripe 
Php :: php time passed since date 
Php :: db($twoRandomPhotosOfSomePeoples); 
Java :: java every second 
Java :: java sleep in code 
Java :: properties java 8 maven in pom xml 
Java :: android open browser 
Java :: flutter Uri toString and String to Uri 
Java :: java cmd install raspbian 
Java :: how to install java 8 on aws linux 
Java :: kill all java processes windows 
Java :: java add commas to numbers 
Java :: javafx button with icon 
ADD CONTENT
Topic
Content
Source link
Name
7+3 =