Welcome Guest, Not a member yet? Register   Sign In
Tutorial - Use new table
#4

(11-18-2017, 12:26 PM)Wouter60 Wrote: I wonder which tutorial you've read. In the CI Tutorial about News, "news08" is never mentioned.
And I think you're mixing up database/table names with controller / method names.
CI doesn't want you to create a "news" database, just a "news" table.

The line
PHP Code:
$data['news08'] = $this->news_model->get_news(); 
Thanks for the replies.

Both replies are helpful.


I am basically following the Tutorial, which is fine, and which I had up and the entire Tutorial running to completion. My issues started when I tried to add a new table and have that working.  Backing up a bit, it is entirely possible my database is called 'news' and my Tutorial table called 'news' because phpmyadmin would not let me create a table called "news" (as per the tutorial told me to create) without a database in existence. So I made one (called "news" just in case,) then put the table "news" inside that. True there is nothing in the Tutorial called "news08." That is just my iterations as I work with CI.
 
The reply about the model might I think points me in the right direction. I was thinking the News.php controller was flowing straight down to the 404 error message s few lines down. I am geting the 404 , which is being triggered over something in the very first lines of News.php.

I think what is happening is the ENTIRE "news_model" is being loaded completely at the top, just before the library and helper. Correct?

Which still doesn't tell me the syntax for my database/table or how to config this up, but I think I am making progress. I will post again on this when I run through all the combinations. Smile

With some playing, as in making a whole new database called Code08, and a "news08" table within that, I can get different error messages referring to line 6 in "news_model" which seems to indicate again, I just ain't pointing at the right database and table.
Reply


Messages In This Thread
Tutorial - Use new table - by JeffreyB - 11-18-2017, 09:34 AM
RE: Tutorial - Use new table - by Wouter60 - 11-18-2017, 12:26 PM
RE: Tutorial - Use new table - by JeffreyB - 11-18-2017, 08:56 PM
RE: Tutorial - Use new table - by JeffreyB - 11-18-2017, 09:00 PM
RE: Tutorial - Use new table - by InsiteFX - 11-18-2017, 12:39 PM
RE: Tutorial - Use new table - by Wouter60 - 11-19-2017, 12:52 AM
RE: Tutorial - Use new table - by InsiteFX - 11-19-2017, 05:06 AM
RE: Tutorial - Use new table - by JeffreyB - 11-20-2017, 12:42 PM



Theme © iAndrew 2016 - Forum software by © MyBB