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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T02:33:54+00:00 2026-06-12T02:33:54+00:00

what is wrong with this query? ALTER TABLE test_table CHANGE text_string text_string VARCHAR(255) COLLATE

  • 0

what is wrong with this query?

ALTER TABLE test_table 
CHANGE text_string text_string VARCHAR(255) 
    COLLATE utf8_unicode_ci NOT NULL 
    COMMENT 'hey here are mysql comments..' ;

in PHPMyAdmin it runs fine, but if i execute this query from my PHP class, it returns this:

error: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '<br>' at line 1

note there is a <br> tag in the mysql error, I assume its from mysql itself as I always use <br /> . I have searched through my code for a <br> too so its not me. Im probably just tired and thats in all mysql errors!

I have been on this now for a while, so why does mysql not like this query? Fresh eyes much appreciated!


PHP handler to run the generated query:

$q = isset($_POST['q']) ? base64_decode(($_POST['q'])): false;

$db->q($q) or die("error: ".mysql_error());

yes, the base64_decode is working right.


$q output:

decoded query

ALTER TABLE sNOWsh_amb_nicks_1st_test_table CHANGE text_string text_string VARCHAR(255) collate utf8_unicode_ci NOT NULL COMMENT 'hey here are mysql comments..' ;
  • 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-12T02:33:56+00:00Added an answer on June 12, 2026 at 2:33 am

    When I decode that bas64 string, it ends with ;<br />. If you’re using PHP to display it, make sure you use htmlentities, otherwise the browser will translate the <br /> to a newline and you won’t see it.

    You need to look at the application that’s sending the POST data. It looks like it’s constructing HTML from its input, so newlines are being converted to <br />.

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

Sidebar

Related Questions

What is wrong with this query? ALTER TABLE KARGO ADD COLUMN test VARCHAR(100) NOT
I do not understand what is wrong with this query? Query tool does not
what is wrong with this alter table command : ALTER TABLE `lp` ADD COLUMN
what wrong with this Query ??? i need this Query. UPDATE user_preferences SET user_preferences_value
I tried to execute this query and i can´t understand what´s wrong with it.
Maybe it's wrong but I always use this query for my app: cme_only =
Why is this wrong? <table> <form> <tr><td>something something</td/> </form> </table> I'm talking about position
Maybe I'm going about this the wrong way... I have an Order table and
what is wrong with this query? INSERT INTO table1 VALUES id, pic0, pic1, pic2,
I am trying to add a column into mysql table using this query but

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.