Welcome Guest, Not a member yet? Register   Sign In
Is MySQL access possible when running the PHP server?
#1

Hi, I'm developing locally, and am running CI from php -S localhost:8000

I also have MySQL installed with phpMyAdmin running on localhost/phpmyadmin

I created a db, table and simple id and message columns, entered a couple of rows of data and tried to pull them out into a CI view.

Quote:A Database Error Occurred

Error Number: 1146

Table 'ci_test.messages' doesn't exist

SELECT * FROM `messages`

Filename: models/Test_model.php

Line Number: 15


This is line 15
PHP Code:
$query $this->db->get('messages'); 

But before I output all my MVC and DB config code, I was wondering if it is even possible to interface with MySQL running on the built in PHP server?

Thanks.
Reply
#2

You might try setting the ip instead of using "localhost" for your db connection.
Reply
#3

(This post was last modified: 04-27-2015, 12:25 PM by n2fole00.)

Ok, it appears I had a problem in my model. I accidentally called the column instead of table.
Reply




Theme © iAndrew 2016 - Forum software by © MyBB