NotORM ist eine PHP-Bibliothek zur Vereinfachung der Interaktion mit Datenbanken. Das hervorstechendste Merkmal ist, dass Tabellenbeziehungen sehr einfach zu handhaben sind. Darüber hinaus ist die Leistung von NotORM sehr hoch und die Einstellungen sind h?her als beim integrierten Treiber.
Mit Datenbank verbinden
include "NotORM.php"; $pdo = new PDO("mysql:dbname=software"); $db = new NotORM($pdo);
Daten lesen
foreach ($db->application() as $application) { // get all applications echo "$application[title]\n"; // print application title }
Bedingte Abfrage
$applications = $db->application() ->select("id, title") ->where("web LIKE ?", "http://%") ->order("title") ->limit(10) ; foreach ($applications as $id => $application) { echo "$application[title]\n"; }
Ergebnisse lesen
$application = $db->application[1]; // get by primary key $application = $db->application("title = ?", "Adminer")->fetch();
Tabellenzuordnung verarbeiten
echo $application->author["name"] . "\n"; // get name of the application author foreach ($application->application_tag() as $application_tag) { // get all tags of $application echo $application_tag->tag["name"] . "\n"; // print the tag name }
Gemeinsame Abfrage JOIN
// get all applications ordered by author's name foreach ($db->application()->order("author.name") as $application) { echo $application->author["name"] . ": $application[title]\n"; }
Ergebnismengengruppierung
echo $db->application()->max("id"); // get maximum ID foreach ($db->application() as $application) { // get count of each application's tags echo $application->application_tag()->count("*") . "\n"; }
Vollst?ndiges Beispiel
<?php include "NotORM.php"; $connection = new PDO("mysql:dbname=software"); $software = new NotORM($connection); foreach ($software->application()->order("title") as $application) { // get all applications ordered by title echo "$application[title]\n"; // print application title echo $application->author["name"] . "\n"; // print name of the application author foreach ($application->application_tag() as $application_tag) { // get all tags of $application echo $application_tag->tag["name"] . "\n"; // print the tag name } } ?>

Hei?e KI -Werkzeuge

Undress AI Tool
Ausziehbilder kostenlos

Undresser.AI Undress
KI-gestützte App zum Erstellen realistischer Aktfotos

AI Clothes Remover
Online-KI-Tool zum Entfernen von Kleidung aus Fotos.

Clothoff.io
KI-Kleiderentferner

Video Face Swap
Tauschen Sie Gesichter in jedem Video mühelos mit unserem v?llig kostenlosen KI-Gesichtstausch-Tool aus!

Hei?er Artikel

Hei?e Werkzeuge

Notepad++7.3.1
Einfach zu bedienender und kostenloser Code-Editor

SublimeText3 chinesische Version
Chinesische Version, sehr einfach zu bedienen

Senden Sie Studio 13.0.1
Leistungsstarke integrierte PHP-Entwicklungsumgebung

Dreamweaver CS6
Visuelle Webentwicklungstools

SublimeText3 Mac-Version
Codebearbeitungssoftware auf Gottesniveau (SublimeText3)
