PHP ORM Solution for SqlServer - php

I am searching for DAL or ORM (Only ORM no MVC) Solution in PHP5 that can efficiently access SqlServer.
I am new to SqlServer. and I need to code a part of ASP.net website in PHP5.
I am currently Using QCodo However its codegenerator is making some problem with ASP's own tables (?? the ASP Guys told me that its for ASP's Membership Management. and these tables are handled internally).So I need some alternative solution that can work in this situation too !!

I've wrestled with this for quite a while and there are a few key points that you need to be aware of when it comes to SQL Server and PHP.
The driver of choice is currently the 2.0 release of the Microsoft Drivers for PHP for SQL Server. You can find more information about that driver here. I installed it using the Microsoft Web PI application.
As of this post, I know of only 1 ORM that supports this driver and that is Propel. That being said, Propel's generator has a dependancy upon Phing, which is best installed via PEAR. After wrestling with trying to get all of this working in Windows Server 2k8, I gave up and I'll just be writing my own wrapper or using the native PDO functions.

Several options, from more to less complex:
Doctrine
Propel
Zend_Db
The three of them support MSSQL through PDO's MSSQL Server extension.

Related

how to use prestashop with mongoDB?

I am starting to implement an e-commerce module with PHP. I analyzed and get prestashop is perfact for my requirement. I read almost all documentation of prestashop but I never find mongoDB. I decided to use database mongoDB. But I am not sure how to use it with prestashop.
Can anyone help me here?
I won't be possible because all classes and module use SQL queries;
I would be theoretically possible to build your own Db driver implementation, but then again you couldn't use it since it needs to process SQL.
Currently there are 3 Db driver type: PDO, mysqli and MySQL, the best one is selected based on server PHP version.

Phalcon with Cassandra PDO?

How to use Phalcon with Cassandra PDO?
At the moment Phalcon does not support Cassandra PDO - actually you are the first person to ever ask for it :)
You can however implement it yourself using these guides
http://docs.phalconphp.com/en/latest/reference/db.html#implementing-your-own-adapters
http://docs.phalconphp.com/en/latest/reference/db.html#implementing-your-own-dialects
Sample implementations can be found in our incubator repo here:
https://github.com/phalcon/incubator/tree/master/Library/Phalcon/Db/Adapter

Latest PHP Framework with ORM in Linux environment which support SQL Server

I've been searching for a Modern PHP Framework just like this post's title. I've tried Yii, Laravel, Doctrine, they do not support that (I really like Laravel).
I've been using good ol' AdoDb PHP DBAL library for SQL Server in Linux, but combine it with Laravel seems impossible...
Anyway, I'm going to check CodeIgniter, SilverStripe, CakePHP, and Zend Framework (last).
If all fails, then I just go with Laravel and make web-service-interface for SQL Server using NodeJS, but the power of ORM will be gone.
I just need some pointers, suggestion, success stories, or anything...
Thanks
EDIT01
Maybe PHP Framework with some kind of technology like Ruby's ActiveResource where the database model is a RESTful web service?

Codeigniter and MongoDB

I am testing out PHP (Codeigniter) and Mongo (library by alexbilbie).
I a new to MongoDB so I got a few starting questions.
Is the library by Alex ready for production use? Can I use all mongodb features?
Is Alex library the best for Mongodb to Codeigniter use?
Do I have to use chained queries like this?
$this->mongo_db->where(array('firstname' => 'Michael'))->get('users');
I want each "part" on a separate row like this:
$this->mongo_db->select('*');
$this->mongo_db->from('users');
$this->mongo_db->where(array('firstname' => 'Michael'));
$query = $this->db->get();
Thank you!
$this->mongo_db->where(array('firstname' => 'Michael'))->get('users');
This is very similar to how the driver operates which is likely why it was chosen. The syntax you're looking for is basically an SQL variant. While possible, this is not generally how it's done with MongoDB as MongoDB doesn't use SQL.
Is the library by Alex ready for production use? Can I use all mongodb features?
In terms of production-readiness, you'll have to run your own sanity checks. MongoDB is backed by a well-funded company (10gen) and the PHP driver is maintained by them. So you should be good there.
For the library, all of the commits have been performed by one maintainer. It's probably in production being used by him, but the code has zero unit tests which is not a great sign.
The wiki would seem to imply that not all features are covered. He even has "maybe" written beside things like "add user".
Is Alex library the best for Mongodb to Codeigniter use?
This is very subjective, how many MongoDB+Codeigniter libraries have you found?

What native mysql class should I port to from Zend_Db? ( No PDO or Mysqli )

I'm dealing with a client who has a legacy cPanel account where the php installation was not compiled with PDO nor Mysqli therefore my Zend_Db code is useless since it relies on either of those.
What library/class should I go with?
Depends what you're trying to achieve, it's possible to extend Zend Frameworks Zend_Db and add a mysql adapter. If this is too much trouble there are two library's that are probably worth looking at, the first depends on PEAR being installed and is MDB2 the other is ADOdb both offer OO DB abstraction and work with the mysql extension.
Meh - I just made my own class mimicking the exact methods and functionality of Zend_Db so I don't have to reprogram a lot of the code.
ezSQL (used by Wordpress)
Codeigniter database class

Categories