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

  • Home
  • SEARCH
  • 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 8494467
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T23:18:24+00:00 2026-06-10T23:18:24+00:00

I’m working on a small PHP/Javascript map application that is basically just pulling a

  • 0

I’m working on a small PHP/Javascript map application that is basically just pulling a bunch of location names and coordinate points from a MySQL database table and adding them to an HTML canvas. It’s supposed to represent locations visited by a character in an ongoing collaborative story, so I’d like to be able to also have the map retrieve the character’s position on the map at any given time and display this with a different icon.

The most obvious solution — since the character, like the map locations, has a name and coordinates — seems to be just including the character as their own row in the locations table as well, and having the map code recognize their unique information and display them differently. But since the character is not, in and of themselves, a location, storing them in the “locations” table seems weird. Creating a whole new table, “character”, just for this one row seems like overkill though.

So I guess my more general question is what is a good way for PHP/MySQL to deal with unique data like this, that is related to existing tables but not closely enough. Do I keep this data in a text file and update that with PHP?

  • 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-10T23:18:25+00:00Added an answer on June 10, 2026 at 11:18 pm

    There’s nothing particularly “weird” about having a table which is intended to have only a single row. Indeed, using a database for some of your data and a text file for other data would probably be a bit more weird.

    Having a table also gives you the possibility of tracking character locations over time, if you ever need that information for any reason. (Better to track it and not use it than need it and not have been tracking it.)

    If the position of the character is calculated on the spot and doesn’t need to be persisted then you can simply add it programmatically to the results from the database and it would be entirely transparent to both the database and the view. But if it does need to be persisted, a table is probably the way to go.

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

Sidebar

Related Questions

I used javascript for loading a picture on my website depending on which small
I have a string like this: La Torre Eiffel paragonata all’Everest What PHP function
I'm parsing an RSS feed that has an ’ in it. SimpleXML turns this
I'm trying to create an if statement in PHP that prevents a single post
I'm working with an upstream system that sometimes sends me text destined for HTML/XML
link Im having trouble converting the html entites into html characters, (&# 8217;) i
That's pretty much it. I'm using Nokogiri to scrape a web page what has
I have just tried to save a simple *.rtf file with some websites and
I want to count how many characters a certain string has in PHP, but
I would like to count the length of a string with PHP. The string

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.