Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6741343
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T11:42:48+00:00 2026-05-26T11:42:48+00:00

I keep getting this error message. The datatype it’s talking about is TEXT and

  • 0

I keep getting this error message. The datatype it’s talking about is TEXT and the data to insert is TEXT so I don’t see what could be the problem.

robin@robin-Latitude-D620:/media/Data/Documenten/PHP/µBot$ php index.php 
PHP Warning:  PHP Startup: Unable to load dynamic library '/usr/lib/php5/20090626/sqlite.so' - /usr/lib/php5/20090626/sqlite.so: cannot open shared object file: No such file or directory in Unknown on line 0
PHP Fatal error:  Uncaught exception 'PDOException' with message 'SQLSTATE[HY000]: General error: 20 datatype mismatch' in /media/Data/Documenten/PHP/µBot/index.php:100
Stack trace:
#0 /media/Data/Documenten/PHP/µBot/index.php(100): PDOStatement->execute()
#1 /media/Data/Documenten/PHP/µBot/index.php(73): addToLog('439', '*', 'irc.gmake.org', ':Please wait wh...')
#2 {main}
  thrown in /media/Data/Documenten/PHP/µBot/index.php on line 100

Block of code where the problem should lie (line 100 is the last line of this block):

function addToLog($type, $channel, $host, $message)
{
    global $database;
    $temp = explode('!', $host);
    $nick = $temp[0];
    unset($temp);
    $timestamp = time();
    $nickprefix = '';
    $query = $database->prepare("INSERT INTO log VALUES ('', :channel, :nick, :host, :message, :type, :time, '');");
    $query->bindParam(':channel', $channel);
    $query->bindParam(':nick', $nick);
    $query->bindParam(':host', $host);
    $query->bindParam(':message', $message);
    $query->bindParam(':type', $type);
    $query->bindParam(':time', $timestamp); 
    $query->execute();
}

Full code: http://pastebin.com/CXCQjqb0

—

SQLite version: sqlite 2.8.17-6.1ubuntu1
PHP version: php5-common 5.3.6-13ubuntu3.2

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-26T11:42:49+00:00Added an answer on May 26, 2026 at 11:42 am

    I don’t know your schema but I’ll guess that id is an auto-increment column and this:

    INSERT INTO log (id, channel, nick, host, message, type timestamp, nickprefix)
    VALUES ('', :channel, :nick, :host, :message, :type, :time, '');
    

    is trying to put an empty string in the id. You probably want this:

    INSERT INTO log (channel, nick, host, message, type timestamp, nickprefix)
    VALUES (:channel, :nick, :host, :message, :type, :time, '');
    

    And please, always specify the column list with your INSERTS and simply leave out any values that the database will supply values for (this includes both auto-incrementing columns and columns with other default values).

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I keep getting an error like this: $(div.valid_box).html(data.message).css(margin-left, 145px).css(width, 520px).show().delay is not a function
I keep getting this error message and I don't understand why: src\Parsing.hs:21:18: parse error
I keep getting this error System.Web.HttpException was unhandled by user code Message=Validation of viewstate
When I post my ajax data to my webservice I keep getting this error.
I keep getting this error message when trying to write to the Event log
Following the RailsTutorial, I keep getting this error message (one of four actually) when
Following the RailsTutorial, I keep getting this error message (one of four actually) when
I keep getting this error in my windows logs: SharePointSocialNetworking.Facebook b0ceb144-b183-4b66-aa10-39fd9ee42bd4 Could not load
when trying to install cygwin, I keep getting this error message: the entry point
I keep getting this weird error message every time I'm testing my app on

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.