how to connect codeigniter with mySqlworkbench - codeigniter

I'm novice to php programming and currently developing a inventory control system as my assignment. I want to use Codeigniter and My SqlWorkbench. I want to know how to connect those two ? How to call SqlWorkbench DB in Codeigniter ? Please help me

You don't understand the basics.
MySQL Workbench is a DBMS, not a database. It is an interface to control databases, in this case MySQL databases. There are alternatives, like phpMyAdmin, chive, HeidiSQL (Windows desktop application) and plenty of others.
You don't connect CodeIgniter and Workbench in any way, they both connect to MySQL database which is standalone service running on the server.
The fastest way to get up running is to setup XAMPP, WAMP or their alternatives on your PC, that way you will have everything you need to get started - Apache, PHP and MySQL. After that you start your MySQL Workbench and can control the contents and structure of any databases and their tables you've created and will be using in MySQL.
I can suggest, that if you ask such a question, you don't know the basics of programming in PHP and CodeIgniter is far off your level, so I suggest you get started with writing basic application in pure PHP with MySQL, because you will not understand how to manipulate things in CodeIgniter and will only waste your time. After you get more familiar and comfortable with these things, you may move to CodeIgniter or other frameworks.

Related

Running Zend with XAMPP on Windows 10 - connect to database

I have a problem learning Zend, hope you can help me. Much approchiato, some evenings lost...
I am following this tutorial and reach an article about a table creation. I am using XAMPP v3.2.2 and in the PhpStorm I can connect to its MariaDB database using a Database panel.
However when I attempt to run the php script load_db described there, it creates a database in my /data folder.
How can I connect it to the XAMPP database? I guess I need to run some MariaDB script in order to connect to the actual database, however I was unable to ask Google a correct question I guess.
I think I am missing something totally obvious, I hope you can push me in the right way.

Neo4j - get friend list up to the 4th degree

I am working with one application which requires to show a friend list up to the 4th degree. After some research I came to know about one solution i.e. Neo4j.
I didn't get a clear idea from their tutorial, can I connect Neo4j to MySQL, and if not how should I implement that myself? I am currently using the codeigniter framework with MySQL.
Thanks.
neo4j is a database, and mysql is a database. so, this question is largely about connecting databases from different vendors together.
at this time, neo4j and mysql do not support direct connections to each other. you'd typically accomplish your desired task by exporting your data from mysql as CSV files (http://www.mysqltutorial.org/mysql-export-table-to-csv/) and importing to neo4j (http://jexp.de/blog/2014/06/load-csv-into-neo4j-quickly-and-successfully/)
michael hunger, a colleague of mine at neo4j, recently wrote this auto importer. you might want to check it out to make this process much easier:
https://github.com/jexp/neo4j-rdbms-import
before going through this data export/import, you may just want to download neo4j and play with the movie dataset. you can do this in about a minute (https://www.youtube.com/watch?v=om6E-HqtrZ0).
then, there are standalone PHP drivers for Neo4j:
http://neo4j.com/developer/php/
josh addell, the author of Neo4jPHP, has even written a post about how to use codeignitor 2 with his library:
http://blog.everymansoftware.com/2011/08/getting-neo4jphp-working-with.html

Drupal modules calling Oracle DB

working on an Drupal architecture where I'd like to have a stand alone Drupal/DrupalCommerce installation with product definition based on content coming from an apart Oracle DB.
Does anybody have experience in integration between Drupal and ORacle.
I'm not speaking about replacing MySQL by ORacle but by using ORacle content in specific modules.
What is the best connections options : XML-RPC, REST, WebServices/SOAP ...
Did you try to define the Oracle database as a secondary database in the Drupal settings file?
http://www.php.net/manual/en/book.oci8.php
http://drupal.org/project/oracle
If you manage to connect, you could then write a custom module to switch to the secondary database, retrieve the data from the Oracle database and bring it into the Drupal context.
I would like to find out if you found other solutions.

Can't use PSQL with a Heroku shared database

I'm developing an application and hosting it on Heroku. For now, I want to use the free shared database solution.
My problem is that I can't access the database.
$ heroku pg:psql
! Cannot ingress to a shared database
I've read elsewhere that I can't connect to shared databases via psql.
I can't seem to find any information on that on Heroku's Dev Center, so this leaves me with the question - how can I edit or change or do anything with my database?
If you're happy to use a beta addon then there is the Heroku Shared PostgreSQL 9.1 addon (https://addons.heroku.com/heroku-shared-postgresql) which will permit you to ingress to your database.
However, any changes to your database are usually best done with scripted migrations (in the Ruby on Rails world) rather than connecting to your database to make changes.
If you're more familiar with mySQL then there are a number of mySQL addons which permit direct access also with normal mySQL tools.

Installer package for program that uses JDBC to connect to MySQL

I have an installer wizard thing called 'install creator'. I want to include my mySQL database into the installer or find another way that the user, upon installation, can just use my database. Prob is-not everyone has MySQL installed on the computer and even then, the user doesn't know the name of the database or my password. Somehow the database must be created automatically upon install, and for my purposes, some of the tables created. How can one do this. Thanks
If you are just using MySQL as a local storage engine, as it seems to be what you are doing, then you should consider using Sqlite with JDBC, instead of MySQL. MySQL is really intended to be used on a server, where information from multiple users is stored, and where the database is accessed only indirectly through the programs that you create that run on the server. You could, in theory, package up MySQL and MySQL Connector/J which lets JDBC talk with MySQL; however, MySQL is a pretty big beast, and I don't think it's nice to do that to your users (also, don't forget that they might already have MySQL installed, and if you were to install MySQL for the first time, you would effectively be forcing them to use your root password). Unlike MySQL, sqlite is intended to provide the structure of SQL for use with lightweight, local file storage.

Resources