
Research
/Security News
Fake imToken Chrome Extension Steals Seed Phrases via Phishing Redirects
Mixed-script homoglyphs and a lookalike domain mimic imToken’s import flow to capture mnemonics and private keys.
00f100/fcphp-datasource-mysql
Advanced tools
Class to manipulate Datasource MySQL
Composer:
$ composer require 00f100/fcphp-datasource-mysql
or add in composer.json
{
"require": {
"00f100/fcphp-datasource-mysql": "*"
}
}
use FcPhp\Di\Facades\DiFacade;
use FcPhp\Datasource\Factory;
use FcPhp\Datasource\Strategy;
use FcPhp\Datasource\Interfaces\ICriteria;
use FcPhp\Datasource\MySQL\MySQL;
// MySQL Instance
$dataConnection = [
'host' => '',
'port' => '',
'username' => '',
'password' => '',
'database' => '',
];
$instance = new MySQL('mysql', $dataConnection);
// to Query Instance ...
$strategies = [
'mysql' => 'FcPhp/Datasource/MySQL/Strategies/MySQLStrategy',
];
$criterias = [
'mysql' => 'FcPhp/Datasource/MySQL/Criterias/MySQL',
];
$di = DiFacade::getInstance();
$factory = new Factory($strategies, $criterias, $di);
$strategy = new Strategy('mysql', $factory);
$query = new Query($strategy);
// Configure query
// SELECT t.field
// FROM table AS t
// LEFT JOIN table AS t2 ON t2.field = t.field AND t2.field = "string"
// WHERE (
// (
// campo = 500 AND
// campo2 = 500 AND (
// field = "value" OR
// field2 < "value2"
// ) AND
// campo3 = "abc" AND
// campo3 = "abc" AND (
// field = "value" OR
// field2 < "value123122"
// ) AND
// campo3 IN (10,20,30)
// )
// )
$query->select('t.field')
->from('table', 't')
->join('LEFT', ['t2' => 'table'], function(ICriteria $criteria) {
$criteria->condition('t2.field', '=', 't.field', true);
$criteria->condition('t2.field', '=', 'string');
})
->where(function(ICriteria $criteria) {
$criteria->and(function(ICriteria $criteria) {
$criteria->condition('campo', '=', 500);
$criteria->condition('campo2', '=', 500);
$criteria->or(function(ICriteria $criteria) {
$criteria->condition('field', '=', 'value');
$criteria->condition('field2', '<', 'value2');
});
$criteria->condition('campo3', '=', 'abc');
$criteria->condition('campo3', '=', 'abc');
$criteria->or(function(ICriteria $criteria) {
$criteria->condition('field', '=', 'value');
$criteria->condition('field2', '<', 'value123122');
});
$criteria->condition('campo3', 'IN', [10, 20, 30]);
});
});
// Configure query
// INSERT INTO
// (column1,column2,column3) VALUES
// (100,"content2",0)
// ON DUPLICATE KEY UPDATE
// `column1` = 50,
// `column2` = "content to update",
// `column3` = 1
$query->insert()
->columns(['column1', 'column2', 'column3'])
->values('column2', 'content2')
->values('column3', false)
->values('column1', 100)
->duplicateKey([
'column1' => 50,
'column2' => 'content to update',
'column3' => true
]);
// Execute Query
$data = $instance->execute($query);
See:
FAQs
Package to manipulate datasource MySQL
We found that 00f100/fcphp-datasource-mysql demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Research
/Security News
Mixed-script homoglyphs and a lookalike domain mimic imToken’s import flow to capture mnemonics and private keys.

Security News
Latio’s 2026 report recognizes Socket as a Supply Chain Innovator and highlights our work in 0-day malware detection, SCA, and auto-patching.

Company News
Join Socket for live demos, rooftop happy hours, and one-on-one meetings during BSidesSF and RSA 2026 in San Francisco.