Question: Can someone teach me how to plot certain records to a desired map using php mysql?
Using php mysql, how can we plot specific record to a desired map using the search or rather when opening a map and upon mouserollover it displays the record. Upon clicking the displayed record, it will displays its complete details to another page. How? What are the syntax? Please give some example.
Answer:
Answer by Colanth
It’s not that simple. You can use onMouseOver to initiate an AJAX request to the server for the record for that part of the map, then use Javascript to display the results when they come back. There’s no “put this code there” solution.
Question: How can I display foreign language characters on a webpage from mysql?
I have english characters, greek, russian, chinese, etc. stored in mysql as UTF-8. When I try to query and display the text, I get ???????????????? chars and boxes. (it is stored properly in mysql and displays fine via phpmyadmin, but not on my site).
Anyone know to display these UTF-8 characters?
Answer:
Answer by bubba5
You have to use this in PHP after you make the MySQL connection: mysql_set_charset(‘utf8′,$ databaseconnection);
More at the link below…
Question: How to move users and privileges from one MySQL server to another?
I used “mysqldump -A” to copy some databases out and then “mysql” to import them back into another server. This works ok but all the user logins and privileges are lost. Is there an easy way to move the users and privileges?
Thanks!
Answer:
Answer by Mutu M
First get latest stable version of phpMyAdmin ( http://belnet.dl.sourceforge.net/sourceforge/phpmyadmin/phpMyAdmin-2.11.1.2-all-languages-utf-8-only.tar.gz ) up and running on your server. After you configure phpMyAdmin open it in your browser ( Example http://127.0.0.1/phpMyAdmin ). After phpMyAdmin loads look in the left panel under “Database” and see if you can find a table named “information_schema”. There are all the privileges stored among other mysql settings. Now, if that table appears to you means that you configured the phpMyAdmin right. Go to “Export” section on top of page. After the page loads select the table “information_schema” from the table list provided by “Export” and leave everything else as it is (unless you know what you are doing). Click “Go”, there your Privileges are saved in a SQL format. Import them on your other mysql server in the same way, but this time go to “Import” section (witch is also located on top of page). Browse for your sql file and leave everything else as it is (also unless you know what you are doing). Now you have your Privileges imported and and working. Good luck
P.S.: You can also try and save “information_schema” with mysqldump but many users report problem when backup is performed using mysqldump command line utility. But if you still wish to try with mysqldump here is the right command to avoid the errors “mysqldump -u root -p –all-databases –single-transaction > all.sql”.
Question: How to I select a database from the MySQL command prompt?
I am trying to test some code in the MySQL command prompt. It keeps giving me an error saying that I am not connected to the database. How can I connect to the database in the command prompt? Can’t figure it out. Thanks.
Answer:
Answer by Mako
mysql -h hostname -u username -p
Replace hostname and username with the database address and your username. It will then ask you for your password.
Question: How many MySQL database is enough for a weblog?
I want to subscribe for a web hosting and the package shown it is giving 50 MySQL. Does is enough for a weblog?
Storage of 5GB and Transfer of 50GB, is it enough?
Answer:
Answer by Colanth
ONE database is enough, since that’s all one weblog uses. The only issue is transfer. If you have 50,000 users, and each one reads your blog every day, maybe not.
Question: how to store images with links in mysql database and how to display it on the web page?
I was planning to set up a website for a bunch of ebooks that displays each ebook images, descriptions, and download links in a row. I know that doing it in php with mysql is the best way to go. But I’ve been tormentedly figuring out how would it be done. I would greatly appreciate any words from you guys. Thanks! \m/
Answer:
Answer by just “JR”
1. You don’t store images in a database: you store their filename and path in DB, and the images somewhere else.
Database: IE
—-
table `books`:
`bookno` int(5) // NOT zero, the book number 1-nnn
`imageno` int(5) // dito
`fname` varchar(30)
—-
Some data:
1, 1, “cover.jpg”
1, 2, “authorpic.jpg”
1, 3, “me.jpg”
2, 1, “cover.jpg”
…
—-
Server folder structure:
root
—- books
——–book1
————pics
————texts
——–book2
…
2. Say you want second picture of book1, using $ bookno (here = 1) and $ picno (here = 2)
$ path = “books/book” . sprintf(“%u”,$ bookno) . “/pics/”;
// will give you path = “books/book1/pics/”
// get the name of the image:
$ sql = “select `fname` from `books` where `book` = ‘”.$ bookno.”‘ and `imgno` = ‘”.$ picno. “‘ limit 1″;
$ list = mysql_query($ sql);
$ lst = mysql_fetch_array($ list);
$ filename = $ lst['fname'];
// now your link(s):
$ txt = ““;
echo $ txt;
or
$ txt = ““;
echo $ txt;
I will teach you how to install Apache, PHP and MySQL and configure them to work together. This is very useful if you want to test out a script or your website before putting it online. It’s also a great thing to have when learning HTML, PHP and CSS as well as other languages. In this part I teach you how to install PHP which is fairly simple.
We design a comment system with AJAX functionality using jQuery.
Question: How to refresh my mysql data base from Visual basic 0.6 use a boton in my form?
I am making a little project in vb 6.0, with a data base in mysql but when ever i save a new registre (a person data ) and i press the next boton but i does see the new register until i go in mysql and press the refresh boton. or till i exit the form. could any one help me with an ado to refresh the data base from a form.
Answer:
Answer by Colanth
How are you connecting to MySQL? (If you use the ODBC connector and ADO, it should be able to select the new data as soon as it’s been updated or inserted.) If you’re using some control, it depends on the code in the control, and you can’t see that so you have no idea why what’s happening is happening – which is why you don’t use someone else’s data controls.
Categories
Tags
2005 2008 Access Apache Best Build connect Create Creating data database display error Excel from Handson INSERT Install Internet into Introduction learn Microsoft MySQL O'Reilly Oracle page Part phpMyAdmin problem Querying server statement table Tables this Tips Training Tutorial Tutorials Using Video Visual website Windows


