Welcome Guest, Not a member yet? Register   Sign In
simple_query question
#11

[eluser]John_Betong[/eluser]
[quote author="Derek Allard" date="1200420403"]Yeah, Seppo is correct, but its my fault... I should have told you. Assuming you're using mysql, grab this.[/quote]
 
Hi Derek,

Many thanks to you and your team for the upgrade.

Your supplied file is not backward compatible UNLESS line 45 is changed to this:
Code:
var $_count_string = 'SELECT COUNT(*) AS numrows ';

   // Old line 45
   // var $_count_string = 'SELECT COUNT(*) AS ';
 

The CI 1.54 code that I used was:
Code:
// Pagination stuff
  $config['total_rows']     = $this->db->count_all('quotes'); // id, quote, author

The Error returned was:
Code:
An Error Was Encountered

   Error Number: 1064

   You have an error in your SQL syntax; check the manual that corresponds to your MySQL    server version for the right syntax to use near 'FROM `quotes`' at line 1

   SELECT COUNT(*) AS FROM `quotes`

Cheers,

John_Betong
 
#12

[eluser]williamparry[/eluser]
Anyone have a tutorial on how to use svnx?
#13

[eluser]Derek Allard[/eluser]
Thanks John, fixed up.

@william, sorry I don't.
#14

[eluser]williamparry[/eluser]
I've copied the files from the SVN onto my computer and replaced the originals and am now getting:

A PHP Error was encountered

Severity: Notice

Message: Undefined property: CI_DB_mysql_driver::$char_set

Filename: database/DB_driver.php

Line Number: 197

(the copy was 9:33am New Zealand Time)
#15

[eluser]Derek Allard[/eluser]
You'll need to add 2 additional config variables to your database.php.

Code:
$db['default']['char_set'] = "utf8";
$db['default']['dbcollat'] = "utf8_general_ci";

That's documented... but its nearly impossible to read the docs in code view as they are presented in the SVN Wink




Theme © iAndrew 2016 - Forum software by © MyBB