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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T12:10:15+00:00 2026-05-15T12:10:15+00:00

I am programming a webpage where the user can upload galleries of his own.

  • 0

I am programming a webpage where the user can upload galleries of his own. When doing so the system creates a subfolder for the images with the same name as the gallery, a reference to the gallery is added as a row in a table and a separate table is also made for the gallery, containing a list of images.

When I try to create a new gallery everything works fine as long as there are no Western European signs. If I for instance name the gallery “beär” I will get an error, “Table ‘databasename.beär…’ doesn’t exist.

The table does however exist with the correct name,
I have tried printing out the variable $sub (That represents the gallery name in the query) right before the mysql query that returns an error, it prints correctly.

Also tried mysql_query(“SET NAMES ‘latin1′”, $connection))) and the same with UTF-8
latin1 does nothing, UTF-8 screws everything over even more (The gallery name will actually then be beär).

The text files are encoded in ISO 8859-1, the charset definition is also ISO 8859-1

this is the query:

if(!($result = @ mysql_query("SELECT * FROM {$database}.`{$sub}`
            ORDER BY item_id DESC", $connection)))
        {showerror();}

Any help is greatly appreciated

  • 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-15T12:10:16+00:00Added an answer on May 15, 2026 at 12:10 pm

    Table ‘databasename.beär…

    You are creating a database table by the name of your gallery. That will not play nicely with special characters in any encoding!

    Correction: According to the docs, it is indeed possible to use any alphanumeric character from the current character set! In that case, you need to change your input. Looking at the error message, the ä in Beär is being served as a UTF-8 character. You need to fix that. Is this taking place in an Ajax request? Those are encoded as UTF-8 by default.

    In any case, I would feel uneasy using special characters in table names. I wouldn’t do it.

    Also, creating per-user tables is usually a symptom of a fundamental design mistake. Why not keep all records in one table, identifying the user through a column?

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

Sidebar

Related Questions

Using IIS7 can I get the IP that accessed a webpage at a certain
I am actually using PHP but such crawling can be done by any programming
I'm programming a Webpage/-Application for the iPhone. I need to scroll to a specific
I'm programming a webpage with Symfony2 and I want to do something very specific
A friend of mine is programming a web page. Instead of writing any HTML
Programming is (so far) just a hobby for me, so I try to find
Programming is at the heart about automating tasks on a computer. Presumably those tasks
Programming has come a long way. I am still relatively young (first Computer: C64),
Programming for my Arduino (in some kind of mix of C/C++), I noticed something
Programming language books usually explain that value types are created on the stack, and

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.