<?php
use Magento\Framework\App\Bootstrap;
require __DIR__ . '/app/bootstrap.php';
$params = $_SERVER;
$bootstrap = Bootstrap::create(BP, $params);
$objectManager = $bootstrap->getObjectManager();
$state = $objectManager->get('Magento\Framework\App\State');
$state->setAreaCode('frontend');
$resource = $objectManager->get('Magento\Framework\App\ResourceConnection');
$connection = $resource->getConnection();
$sql = "Select * FROM customer_entity" ;
$result = $connection->fetchAll($sql);
print_r($result);
?>
Tag Archives: Custom
Custom Wrappers
stream_wrapper_register(protocol, classname) Registers a protocol; implementation is part of the class
The class implements standard functionality like reading, writing, or changing the file position.
php_user_filter is a predefined class in php and is used in conjunction with user-defined filters.
Read custom field values of a post – WordPress
The below given code will list all the values added to the given fields
<?php
$custom_fields = get_post_custom(POST_ID);
$fieldsValue = $custom_fields[‘FIELD’];
foreach ( $fieldsValue as $key => $value )
echo $value . “<br />”;
?>