473,385 Members | 1,356 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

& not retrieve from Mysql Database

Hello friends,

I have face a problem, the problem is that when i fetch data from mysql database i get '&' in the place of '&'. I am using php 5.1.2 and mysql version 5.0.11-beta.

What is the problem? any body solve my problem?

Please answer me.

Thanks in advance!
Aug 5 '09 #1
3 3526
code green
1,726 Expert 1GB
Are you sure?
If viewing results in a browser you won't see the 'amp;'
Aug 5 '09 #2
Thanks for your reply.

Yes i can't see the 'amp;'.

I entered a text like 'testing articles & others' in a text box. This text saved in a mysql database like 'testing articles & others'. But when i fetch this text through mysql_fetch_assoc the text display in the browser like 'testing articles & others' and if i submit this text again in the database i find only 'testing articles & others' . So each time when i edit this i have to put '&' in the place of '&'.

Thanks in advance!
Aug 6 '09 #3
code green
1,726 Expert 1GB
If you view the browser source code you will see '&' It is still there just not visible in the browser as should be.
But if I understand your problem, you wish to reinsert the edited data back into the DB with 'amp;' still intact.

First just double check what I have said above is correct.
Then are you using PHP by any chance?
If so try calling function htmlspecialchars() just before inserting the text back into the DB.

Failing that, the only thing I can think of is runnng the text through your own function using string functions to add the additional 'amp;' before re-insertion
Aug 6 '09 #4

Sign in to post your reply or Sign up for a free account.

Similar topics

3
by: James | last post by:
HI, I'm looking for a script that will allow users/admins to have a one click backup solution for a MYSQL Database.. 'BACK DATABASE' button, click and its done... The a restore option, that...
1
by: Ken | last post by:
First time I have installed mysql. I have not been able to connect to the server/database with a new php installation. I have installed IIS. Do I need this for mysql? The php works fine. ...
1
by: Andy | last post by:
I'm using Mysql Max-4.1.4-gamma for Linux. I have a question related to a problem with my database server. If on my db server I have 2 different database, say DB1 & DB2, I create two INNODB tables...
4
by: MLH | last post by:
A programmer developed an AMP (Apache/MySQL/PHP) application for me. When he was done, he sent me the PHP files and the MySQL dump file. Now, when I connect to the application on my LAN using...
3
by: Steven Sinfield | last post by:
Hi All, I am trying to use PHP & MySQL over SSL, my issue is that the data that I am querying also needs to be available by non-secure as well. Can someone please help me in doing this. ...
1
by: Smriti Dev | last post by:
Hi, I have a question regarding autonumbering . I'm using linked tables between msql and MS Access. Quite a few linked tables exist with relationships. The auto increment fields once linked...
2
by: pmz | last post by:
Dear Group, I'm connecting in C# with remote (BSD) MySQL server with ODBC Driver, and I'm trying to find the best sollution in such problem: As I've read on MySQL manual, they have suggested...
4
ronverdonk
by: ronverdonk | last post by:
Sorry acousticmarc, I accidentally removed your thread!! - Ronald Hello, first time post here and novice php user. Man, this is frustrating the hell out of me. I've got a timecard database...
0
by: AndrewJ | last post by:
I am having problem decoding data which is imported into a MySQL 4.0.* DB (thus no UTF-8 character set encoding possible) Basically my application utilises PEAR for DB abstraction. I import...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.