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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T01:38:51+00:00 2026-06-15T01:38:51+00:00

I am working on some code using Google Maps API. To sum up shortly,

  • 0

I am working on some code using Google Maps API. To sum up shortly, I have MySQL database with a table of information used to generate markers on the map. I connected to the database and am using PHP to draw out the necessary attributes and communicate with my Javascript code using XML.

What I’m currently attempting to do is go in the other direction, I’m trying to send a string of information (for example “1,2,3,45,18”) from my Javascript code to MySQL to be set as a session parameter (call it @sparam). What is the process behind passing this value to MySQL?

Would I be able to access a MySQL variable through PHP in the same way I can access tables (for the purpose of getting a value back into Javascript)?

I’d appreciate any insight.

Thanks.

EDIT

Maybe I was unclear in my original post. What I’m asking is how would I be able to pass a string to a MySQL session variable, specifically a set of IDs directly related to the IDs in the table of the MySQL database, and then be able to work with these IDs by calling the necessary procedures in MySQL. In turn, the procedures called in MySQL would generate some output, which would then have to be passed back to the Javascript code.

  • 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-15T01:38:52+00:00Added an answer on June 15, 2026 at 1:38 am

    I created a special JSON (JavaScript Object Notation) php pages that I would call from javascript. Then I would parse those JSON responses.

    Simple example:

    JAVASCRIPT:

    function getCheckedUnits() {
        jQuery(function($) {    
            $.ajax( {           
                url : "page_json.php?action=getsession",
                type : "GET",
                success : function(data) {
                    //Get Json and loop over it's data
                    if (data.length>10){
                        var jsonData = JSON.parse(data);
    
                        $.each(jsonData, function(Idx, Value) { 
                            if  (Idx>0){
                                //get values for each vehicle and then remove it's marker from the map and then add new marker on the map (thereofore update the marker)
                                c_latitude = Value["lat"];
                                c_longitude = Value["lon"];
                                c_name = Value["name"];
                                c_notes= Value["notes"];
                                removeMarker(c_name); //remove old marker function
                                addMarker(c_latitude, c_longitude, c_name); //add current marker function
                            }
                        });
                    }
                }
            });
        });
    }
    

    PHP: Here I loop over my arrayList and then create a simple array with values. Then I just output it as a json string

        foreach ($listOfCars->arrayList as $key => $value) {
    
            $unit = new fleetUnit();
            $unit = $value;
            //create array for json output
            $data[] = array('lat' => $unit->lat,
                'lon' => $unit->lon, 'name' => $unit->name, 'notes' => $unit->notes);
        }
    
        echo json_encode($data);
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have written some JavaScript code that will read from the Google Maps API
I'm working some code that inserts csv rows into an SQLite database using Python.
I'm working on an advanced map application in Google Maps API V3. I'm using
http://rickgutierrez.bol.ucla.edu/map_mobile6.htm I am working on a mobile map using google maps API and JQuery
I am working on a website using Google maps apiv3. I have a button
I'm having some problems with a project I'm doing using Google Maps. I have
I am working on some code using the EMF framework in Java, but it
I'm working on making some code using metaheuristics for finding good solutions to the
I am working on some code that previously was using a cfquery, and is
I'm porting some (working) code from Linux to Windows 8. I'm using DDK. typedef

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.