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 7802513
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 2, 20262026-06-02T01:17:16+00:00 2026-06-02T01:17:16+00:00

My site uses Session and I’ve configured it to save information to the database

  • 0

My site uses Session and I’ve configured it to save information to the database to allow me to save larger amounts of user data.
The site also connects to a MySQL and MSSQL database to retrieve information for the user. The Session database is in the MySQL database and this part is working.

The logic of the site goes:
1. User searches for something, the search button is attached to some jQuery code which sends the search term to 2 functions in my controller.
2. Function 1 accesses the MSSQL database, gets the data, saves the query and the results of the query to the session and returns the query results to the View.
3. Function 2 does the exact same except it queries the MySQL database.

Function 1 code does this:

 $this->session->set_userdata('get_function1_query',$lastquery);
 $this->session->set_userdata('get_function1_result',$query->result_array()); 

Function 2 code does this:

 $this->session->set_userdata('get_function2_query',$lastquery);
 $this->session->set_userdata('get_function2_result',$query->result_array()); 

The problem is that the Function 1 code does not save the data to the session table. If I remove the Function 2 code then the Function 1 code works!

Lastly, The result sets of the queries is small. Even so I changed the datatype of the ‘user_data’ field in the ci_sessions table from TEXT to MEDIUMTEXT to allow more information to be stored there.

Can anyone help?

Thanks!

  • 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-06-02T01:17:17+00:00Added an answer on June 2, 2026 at 1:17 am

    Solved it using the CodeIgniter native session
    http://codeigniter.com/wiki/Native_session

    It appears that there are some issues with Sessions and jQuery in CodeIgniter

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

Sidebar

Related Questions

I have a site that uses a GET form to allow a user to
I currently have a site which uses a MySQL 4.x schema, the site uses
I am working on a site that uses Facebook Connect for user login/creation. I
My site currently uses http and https sections based on the data being collected
Note: Our site is built in PHP and uses MySQL databases. I already manage
I have a MVC 2.0 site that uses SQL Server as it's session state
I am building an ASP.NET web site that uses FormsAuthentication and a standard Session
I was wondering if HttpContext.Session uses cookies to store data. A work colleague told
I have a secure site with private information that uses https. We have a
We have a very dynamic site which uses session storage extensively to keep track

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.