Welcome Guest, Not a member yet? Register   Sign In
CodeIgniter 1.7.0 Released
#41

[eluser]Derek Jones[/eluser]
Did you update your helpers? Your Form Helper sounds like it's out of date, or being extended with code that is no longer valid.
#42

[eluser]blewis[/eluser]
I deleted and re-uploaded the libabries, language, helpers, database, and codeigniter directories within system. So yes, the helpers were updated. The form_helper.php file is showing today's date, so I know it got updated.

Thanks,
Bryan
#43

[eluser]Derek Jones[/eluser]
Your server may be using cached versions of the files, if it's using eAccelerator for instance. Could be the controller itself, as well, since the error really doesn't match up accurately.

Edit-add: And again, you aren't extending the form helper, are you?
#44

[eluser]blewis[/eluser]
Well I think that Xcache is running, but I don't know how to go about clearing it.

I am not sure what you mean by "the controller itself". Other than changing the form validation code to match 1.7, my controller file is unchanged.
#45

[eluser]Derek Jones[/eluser]
Perhaps contact your server administrator? In the meantime, introduce a syntax error into form_helper.php to force a flush of that file.
#46

[eluser]blewis[/eluser]
Well, I have restarted the httpd, I have forced an error into both the form and url helpers. When I do so, I see the syntax error in the browser. Then I fix the error and refresh and the old error comes back. Very strange.

BTW, xcache is disabled in the php.ini, so no caching is running.

Bryan
#47

[eluser]Derek Jones[/eluser]
Are you extending the form helper?
#48

[eluser]blewis[/eluser]
Ok, so dumb issue.

I still had a rouge reference to
Code:
<?php echo $this->validation->error_string; ?>
in the view file. After changing "validation" to "form_validation" it works.

Sorry to waste brain cycles.
#49

[eluser]orotone[/eluser]
I'm having problems with CI 1.7 and where it back-ticks in the database class. I now get incorrect SQL:
Code:
SELECT `i`.`vinvid`, `i`.`volume`, `i`.`page`, `i`.`sequence`,
  `v`.`title`, `v`.`price`, `v`.`pricekey`, `i`.`paper`,
  `i`.`condition`, `i`.`ebayprice`, `i`.`status`, `i`.`picture`
FROM (`volinv` i)
JOIN `newvolume` v ON `i`.`volume` = `v`.`volume` AND i.sequence = v.sequence
WHERE `i`.`status` = '1' AND `i`.`volume` = '13'
ORDER BY `volume,` sequence
Note that the parts of my tables/rows are not back-ticked after the AND in the JOIN and especially note that the back-ticks around the volume column in the ORDER BY statement are incorrectly around the comma, which causes the SQL to fail. All works fine and is correctly back-ticked in 1.6.3

Here's the code from the module:
Code:
function get_volume($volumeSearch)
    {
        if ($volumeSearch['status']){
            if($volumeSearch['status'] == 1){
                $this->db->where('i.status', $volumeSearch['status']);
            }
        }
        if (is_numeric($volumeSearch['vinvid'])){
            $this->db->where('i.vinvid', $volumeSearch['vinvid']);
        }
        if (is_numeric($volumeSearch['volume'])){
            $this->db->where('i.volume', $volumeSearch['volume']);
        }
        if ($volumeSearch['page']){
            $this->db->where('i.page', $volumeSearch['page']);
        }
        if ($volumeSearch['sequence']){
            $this->db->where('i.sequence', $volumeSearch['sequence']);
        }
        if ($volumeSearch['title']){
            $this->db->like('v.title', $volumeSearch['title']);
        }

        $this->db->select('i.vinvid, i.volume, i.page, i.sequence');
        $this->db->select('v.title, v.price, v.pricekey, i.paper, i.condition');
        $this->db->select('i.ebayprice, i.status, i.picture');
        $this->db->from('volinv i');
        $this->db->join('newvolume v', 'i.volume = v.volume AND i.sequence = v.sequence');
        if ($volumeSearch['invord'] == 1){
            $this->db->order_by('vinvid');
        }else{
            $this->db->order_by('volume, sequence');
        }

        return $this->db->get();

    }

Perhaps I'm doing something wrong--I'm an old C and SQL programmer and not so used to the Active Record stuff.
Thanks!
#50

[eluser]DiRN[/eluser]
I am now getting errors with
Code:
$this->db->orderby("field1, field2")
as this is producing
Code:
ORDER BY `field1,` field2




Theme © iAndrew 2016 - Forum software by © MyBB