Creating a Qoran database with audio

Hi everyone,

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.

thanks in advance

If you have phpMyAdmin or Workbench it should be as simple as
CREATE DATABASE your-name-of-choice-here
and then importing the sql file.

Hopefully this is not a productions website. XAMPP is only suitable for development environments.

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.

Sure thing.

thanks for the replies

i found a sql file which is not exactly the same as the site i mentioned before but should do for now

the sql file can be download on this link sql file the language of the sql file is all in arabic.

when i import the sql file im getting these errors

Static analysis:

6 errors were found during analysis.

  1. Ending quote ’ was expected. (near “” at position 1237227)
  2. Unexpected beginning of statement. (near “DON” at position 0)
  3. Unexpected beginning of statement. (near “‘T USE WITH MSSQL! MSSQL VERSION CAN BE FOUND ON WWW.QURANDATABASE.ORG / / DON’” at position 3)
  4. Unexpected beginning of statement. (near “T” at position 85)
  5. Unexpected beginning of statement. (near “UPLOAD” at position 87)
  6. Unrecognized statement type. (near “TO” at position 94)

Which format of the database did you download?

I downloaded the MySQL Query file format

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?

i did emailed them yesterday but till now no replies

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.

  1. Unexpected beginning of statement. (near “EATE” at position 0)
  2. 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 (

`ID` INTEGER NOT NULL AUTO_INCREMENT,
`Da' at line 1

Despite how frustrated you may be feeling, that’s really very encouraging as it’s a simple fix.

There is no EATE it is CREATE

Put the “CR” back and it looks like you should be good!

EDIT
speaking of typo’s lol

1 Like

and the “R”

1 Like

strange when looking in the sql file

it says CREATE

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)
);

Hmmm. there’s nothing before that line? eg. a backslash

Is the file UTF-8 without BOM?

File is encoded in UTF-8

I didn’t realise that XAMPP now comes with MariaDB rather than MySQL - I don’t know if this makes any difference?

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.

Thanks again

1 Like

This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.