Git Product home page Git Product logo

doctrine_learning's Introduction

Doctrine_Learning

Doctrine is the most effective way of database connection for PHP projects

What's inside?

Doctrine is a Database middleware for PHP, it uses Object Relational Mapper (ORM) and Database Abstraction Layer (DBAL) to securely and effectively interact withDatabase from your Code. This codes, which I have written, will give you the very basics of how to setup and use Doctrine in your simple PHP projects. To learn more you should refer to https://www.doctrine-project.org

  1. To install run composer install

packages/bin/doctrine orm:schema-tool:create

  1. you can add/modify your entities at src/ and can run packages/bin/doctrine orm:schema-tool:update --force

  2. to check what the sql generated packages/bin/doctrine orm:schema-tool:update --force --dump-sql

  3. once database structure created you need to enter some data in your DB: php createUser.php yourname and php createBug.php bugdesc 1

  4. once you populated data you can can now run the doctrine queries/methods

  • _php findUser.php 1 _
  • _php findByUser.php yourname _
  • _php findAllDQL.php _
  • _php findByPagination.php _
  • _php findNativeQuery.php _

Read more @ courtesy : [Doctrine project|https://www.doctrine-project.org]

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.