Welcome Guest, Not a member yet? Register   Sign In
Old CI install, recently upgraded PHP and MySQL, and now one query doesn’t work...
#21

[eluser]Bob Puzld[/eluser]
Yes, all others appear to be working. Which question did I miss? Did the info I just provided in my previous post help any? Remember I am a novice at this stuff, so I may not know all of what you are asking. I am just trying to help a friend out... and I do appreciate your help.
#22

[eluser]sophistry[/eluser]
[quote author="sophistry" date="1240021876"]
so, are you able to get any calls to the database to work? that is, do any o your pages work and show data like they are supposed to?

if so, please post the code that is working alongside the code that isn't working.
[/quote]

please post the working code too.

EDIT: sorry, i wasn't being clear.. please post the working Controller code, not just the view pages.
#23

[eluser]Bob Puzld[/eluser]
In my previous post above I showed the code that is working and the code that isn't. The first block of code is not working, and the second block is working.
#24

[eluser]sophistry[/eluser]
the code posted is from a "view" file. this is the last stage of processing that CI does. the main code i am referring to is called a controller: http://ellislab.com/codeigniter/user-gui...llers.html

the view code only shows a little bit of the whole picture; it is incomplete without the controller (and often the model). please refer to the CI manual to become familiar with the common CI terminology so that we can speak the same language. Wink
#25

[eluser]Bob Puzld[/eluser]
Sorry, I didn't see your note down at the bottom of your last post. I will look for controller code.
#26

[eluser]Bob Puzld[/eluser]
Ok. I have attached the controller and model files into a zip file. I tried to post them in here but they exceeded the allowed 6,000 characters. Let me know if this info helps. Thanks again.
#27

[eluser]sophistry[/eluser]
no, it doesn't help. please strip out extraneous details and post to the forum. or if you need to, make multiple posts.

just thinking out loud here, but, i'm wondering if you could do some changes on your own and report what happens when you change stuff around. you know, debugging, and stuff?

for instance, before going and zipping that set of files, did you try dumping any variables in the controller?

you have the running code and the motivation, use it.
#28

[eluser]-sek[/eluser]
I do have some experience with quirks showing up in the latest CI

Sometimes Active Record does not like whitespace in queries. So if you wrote

Code:
$select = ' id, title, text ';
and passed it to $db->select($select)
it may fail unless the leading whitespace is removed

There are some other things, like compound statements and certain JOINs the AR would not accept.

Also, AR can give strange or no error when the table name is missing, so be sure you are specifying it.

A simple way to check is to enter a nonexistent column name into the query, then let CI display the SQL in the error message, copy and paste this into the SQL command line to see if the query actually runs. If it does, you know something is wrong in Active Record.

Code:
function GetPaymentRequests() {
    $this->db->select('users.*, payouts.amount, payouts.id as payout_id');
    $this->db->from('payouts');
    $this->db->join('users','payouts.user_id = users.id','INNER');
    $this->db->where('date_paid','0');
    $this->db->where('organization_id',0);
    $this->db->orderby('date_requested ASC');
    return $this->db->get();
  }

I do not see any obvious problems. I once had to rewrite a join AR would not run.
#29

[eluser]Bob Puzld[/eluser]
You know what Research, stick it. I have had enough of your insulting comments and aimless assistance. Either you want to help or shut the FU. I have told you numerous times that I am new to this stuff and just looking for some guidance, in order to help a friend. And you are right, you don't have to help, so do me a favor and don't reply anymore. I will try to find assistance elsewhere.
#30

[eluser]Bob Puzld[/eluser]
Thanks Grad for your advise. I will let you know what I come up with.




Theme © iAndrew 2016 - Forum software by © MyBB