Welcome Guest, Not a member yet? Register   Sign In
help .... I got a FATAL ERROR -- probably syntax
#11

[eluser]JPrieto[/eluser]
GOOD NEWS!

i made each field in the database table to collate to utf8_general_ci

end the problem went away

BUT NOW ....

i get this NEW error

Parse error: syntax error, unexpected T_ENDFOREACH in C:\wamp\www\gifts\system\application\views\blog_view.php on line 13

and here in the code for that line

Code:
<?php endforeach; ?>
#12

[eluser]JPrieto[/eluser]
oops ... sorry
i was supposed to put a : at the end of the foreach statement in the views file
i fixed that

BUT NOW.....

i get this other error -- omg!

Fatal error: Call to a member function result() on a non-object in C:\wamp\www\codeigniter\system\application\views\blog_view.php on line 8

here we go again

lol

we will kill the beast (bug)!!

any tips?

please - thanks
#13

[eluser]Thorpe Obazee[/eluser]
what's line 8?
#14

[eluser]SpooF[/eluser]
Are you running two separate installations of Codeigniter? Everyonce in a while you post a url with gifts and then other times its codeigniter. I would suggest just working on a single project at a time. That way your not working with two different code bases. It will make it a lot easier to not make small mistakes. Also you might fix something in one setup, but not the other and get frustrated when something doesn't work.

One reason why I say this is in the code you supplied you had the colon after the foreach statement.
#15

[eluser]JPrieto[/eluser]
line 8
Code:
<?php foreach ($query->result() as $row): ?>

i'm only using ONE installation
it is called gifts
it is a sub-directory in my www root directory

when posting, i change the word gifts to codeigniter to prevent confusion
but it is only 1 installantion

i tried to solve the problem using a : then using ;
right now it is using a :

thanks

i also tried a space after thr word foreach - and tried without space
both way i get the SAME error

wow .. well, i'm almost there ..... chasing the bug -- I'll catch up (with your help)

ALSO...........

when the error displays, there is a big square that displays this too

================================================
A PHP Error was encountered
Severity: Notice
Message: Undefined variable: query
Filename: views/blog_view.php
Line Number: 8
=================================================
#16

[eluser]JPrieto[/eluser]
my server has PHP Version 5.2.6
can this be the cause?
#17

[eluser]Thorpe Obazee[/eluser]
I am certain that you are overlooking something.

You know, I think you should probably look into learning PHP first. The user_guide is very useful and much more if you know the basics of PHP.

2cents.
#18

[eluser]SpooF[/eluser]
Quote:================================================
A PHP Error was encountered
Severity: Notice
Message: Undefined variable: query
Filename: views/blog_view.php
Line Number: 8
=================================================

Was that always being displayed?
#19

[eluser]JPrieto[/eluser]
hi,
i guess i am at an intermediate level in php
and i have read the user guide... page by page (the first 2 columns only so far)
but all the bugs i fixed so far (in duplicating the tutorial videos)
where due to forum help -- nothing in the user guide helped

i am documenting my journey duplicating tutorial video 1 and 2

so far i have 4 facts -- more like modifications -- of what the video teaches that will make tutorial work

i plan to put it all together into a pdf file and freely share it here
as a token of my gratitude for assistance received
and to help beginners after me

but me personally will never send them to the user guide when they are working through the video tutorials

by the way .... is the user guide updated, or a bit outdated as in the tutorial videos? just curious.
#20

[eluser]wiredesignz[/eluser]
It's pretty simple, the line
Code:
$data['query'] = $this->db->get('entries');
should return an object and it is not.

So the foreach loop is unable to call the result() method of a non existent $query object at line 8 of the view file.

You need to verify why $this->db->get('entries') is not working or make allowance for it failing.




Theme © iAndrew 2016 - Forum software by © MyBB