CodeIgniter Forums
simple_query question - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20)
+--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forumdisplay.php?fid=23)
+--- Thread: simple_query question (/showthread.php?tid=5252)

Pages: 1 2


simple_query question - El Forum - 01-16-2008

[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
 


simple_query question - El Forum - 01-17-2008

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


simple_query question - El Forum - 01-18-2008

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

@william, sorry I don't.


simple_query question - El Forum - 01-18-2008

[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)


simple_query question - El Forum - 01-18-2008

[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