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.
Related
I have to rewrite PHP project, and as a person who comes from CI and Kohana frameworks I'am looking into using FuelPHP - times changes, time to try something new. Only this project requires PostgreSQL.
I'am very new to FuelPHP, so my problem explanation can be foolish :). I've installed pgsql PDO module, set database, etc., so everything what PHP and PostgreSQL itself requires for work is set.
Now I want to know, is it possible, to get FuelPHP work with PostgreSQL? As I understand in current 1.3v only way is PDO, but for me somehow it doesn't work - no connection or select errors, just empty selects. I red somewhere that in 2.0v pgsql will be supported better, bet I don't think it's solution to use 2.0v beta release. :)
Currently I'am trying to understand if it will be possible to use FuelPHP for this project, because it's a long term work - ~6 months for rewrite for one person - but after that there will be included more programmers.
It is not perfect but FuelPHP works PostgreSQL. At least you can CRUD.
See http://docs.fuelphp.com/classes/database/introduction.html
There is a example configuration for PostgreSQL
// a PDO driver configuration, using PostgreSQL
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?
I need to load data from an old DB into a migrated schema of this DB using Doctrine migration system.
I guess Doctrine might help me in this process.
I tried and lost a few hours using ETL scripts programs, without success.
From my point of view I need to :
Create a DB with the V0 schema
Load the data from the old DB (schema are identical)
Migrate DB to latest version using Doctrine migration
Extract data
Load it in the new DB
WHat do you think of this process?
Do you think it is feasable using Doctrine?
I tried a few searches on Google without success.
I am currently reviewed the features of Doctrine_Core class.
Thanks for your help
Yes, it is possible to migrate data from one database to another using Doctrine.
It sounds like you're trying to do a one-time database revision and migration and that your applications are not currently written using Doctrine. In that scenario, database abstraction has little or no benefit, unless you're also rewriting the applications to use it.
If you have no prior experience using Doctrine then I seriously doubt that writing custom migration classes in it will be easier than doing it with whatever database API you are already experienced using. It makes sense to use the migration classes (some times) if you are already using Doctrine for your development. Otherwise it's another layer and API you don't need.
I'm using Doctrine 1.2, which has some nice features for migrations but also a number of bugs and omissions of expected functionality. Reportedly version 2 improves on this but I haven't used it yet.
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.
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