i need to create a a Qoran database that looks like this on this site http://moskeebadr.nl/index.php/qoraandatabas
i already have set up XAMPP and its working great with my wordpress.
if someone could help me out getting me in the right direction how to create the mysql databse and everything it needs.
Very true. Nonetheless it can be good for development.
AFAIK, in terms of (MySQL) databases, the usual process to first CREATE DATABASE then import the sql file.
The sql file should have a lot of
DROP TABLE IF EXISTS
CREATE TABLE
INSERT INTO
lines taking care of the rest - as long as there is a database for it to do its stuff in.
I suppose there might be CHARACTER SET and COLLATION problems, especially when the language is Turkish, so that should be looked into when creating the database.
Of course then remains what to do with it. This is where differences between the development and production environments can be a problem. And there might be a problem if the version of the database is different, but in my limited experience I haven’t encountered any.
That’s odd as it looks as though the error is in the file you downloaded rather than anything you did. Is there any support from the site you got the database from?
Except for the first error - sorry I have no idea where “position 1237227” is and I am not going to count.- the rest seem to be from the comments. i.e.
/* DON'T USE WITH MSSQL! MSSQL VERSION CAN BE FOUND ON WWW.QURANDATABASE.ORG */
/* DON'T UPLOAD TO ANYWHERE, BECAUSE WHEN A BIG MISTAKE FOUND ON A DATABASE WE CAN'T REACH THEM FOR WARNING! */
/* This SQL Query Generated at 21 January 2016 19:22 (UTC) from www.qurandatabase.org */
/* Database Format: MySQL Query (V1.2) -Chapter names will be added in next update- */
/* Database ID: 1 */
/* Database Name: (Arabic: (Original Book)) */
CREATE TABLE IF NOT EXISTS `Quran` (
`ID` INTEGER NOT NULL AUTO_INCREMENT,
`DatabaseID` SMALLINT NOT NULL,
`SuraID` INTEGER NOT NULL,
`VerseID` INTEGER NOT NULL,
`AyahText` TEXT CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL,
PRIMARY KEY (`ID`)
);
I don’t understand how the comments could be considered to not be comments, but if you remove the /* .... */ comments is it any better.
i tried again this time removing what you just said.
but this time im getting this error
ErrorStatic analysis:2 errors were found during analysis.
Unexpected beginning of statement. (near “EATE” at position 0)
Unrecognized statement type. (near “TABLE” at position 5)SQL query:
EATE TABLE IF NOT EXISTS Quran ( ID INTEGER NOT NULL AUTO_INCREMENT, DatabaseID SMALLINT NOT NULL, SuraID INTEGER NOT NULL, VerseID INTEGER NOT NULL, AyahText TEXT CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL,
PRIMARY KEY (ID)
)
MySQL said:
#1064 - You have an error in your SQL syntax; check the manual
that corresponds to your MariaDB server version for the right syntax to
use near 'EATE TABLE IF NOT EXISTS Quran (
CREATE TABLE IF NOT EXISTS Quran ( ID INTEGER NOT NULL AUTO_INCREMENT, DatabaseID SMALLINT NOT NULL, SuraID INTEGER NOT NULL, VerseID INTEGER NOT NULL, AyahText TEXT CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL,
PRIMARY KEY (ID)
);
I did no now that UTF-8 and UTF-8 without BOM have such a different outcome when importing a sql file.
after changing the encoding UTF-8 to UTF-8 without BOM it worked like a charm.
sql file is imported correctly
I really appreciate the time and help Mittineague and gandalf458
Thank you, my problems are all fixed.