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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T14:17:23+00:00 2026-06-01T14:17:23+00:00

My problem is that the database fields have been badly designed by previous people

  • 0

My problem is that the database fields have been badly designed by previous people before me. We are accessing the table rows horizontally.

I am working with PHP and jQuery right now and I am passing data back and forth through AJAX. In PHP I am accessing this array like so:

$attendance['date_lesson_' . $lessonCount] 

where lessonCount is a number from 1-10 that is incremented i.e. if lessonCount = 1 then above would be $attendance['date_lesson_1']

I am passing the attendance array through json_encode

How do I therefore access this field data_lesson_ 1 up to 10 in jQuery?

I am trying to do:

var lessonCount = 1;

attendance[i].date_lesson_+lessonCount

//do some stuff with attendance.date_lesson_ 
lessonCount++;

It was easy in PHP cause you concatenate strings with the dot "." but this isn’t a string I’m dealing with in jQuery/JavaScript so how on earth would I do this?

Yes, I know. This is awkward. I agree 100%.

  • 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-01T14:17:25+00:00Added an answer on June 1, 2026 at 2:17 pm

    You’ll need to use bracket notation:

    attendance['date_lesson_' + lessonCount]
    

    Dot notation can only be used with identifier names as property names.

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

Sidebar

Related Questions

that my problem: I have database table like that: id (AI) market_id 1 6
Possible Duplicate: SQL Server Database query help Hi, I have a problem that I
I have a problem here. I have about 13K rows of data that I
I have a problem that I have been trying to solve for a couple
I have been trying to retrieve particular fields from my database using NHinernate. The
I'm using SQLite database. The problem is that data isn't written to base. NSLog
I've a problem with LINQ. Basically a third party database that I need to
-----UPDATE----- Well, seems that the problem was in last.id . When database is created
I'm currently writing a Java app that interfaces with a MySQL database. My problem
I've got a links array that I'm saving to a database. The problem is

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.