Page 1 of 1

General topic about portal

Posted: Wed Feb 27, 2008 10:44 pm
by imagetvr
Hello

I wish to develop a portal for online examination. Please suggest me


1. If i use PHP which is best backgroud (MYSQL or someone)

2. I have datas in word file and jpg format. IS it possible to convert data from word and jpg to mysql or some other database.

Please suggest me how can i convert datas to database ?


Thanks
senthil kumar.A

Re: General topic about portal

Posted: Thu Feb 28, 2008 2:26 am
by Chris Corbyn
PHP can work with many different databases, but the two most common are MySQL and Postgres. The vast majority being on MySQL. Libraries like PDO will allow you to interface with lots of DBMSs without having to write lots of different code to support them all.

As for "converting" MS word files and JPEG files into a database I'm not entirely sure what you mean. You can store the files in the database as BLOB types (binary data) but it's generally more advisable to store them on disk and reference the path in the database instead (faster and easier to maintain the DB!).

Re: General topic about portal

Posted: Thu Feb 28, 2008 8:33 am
by Chalks
I think what he means is that he wants to take the data from a word file (or what have you) and insert it into a database. I would imagine that the easiest way to do that is to create a php file to parse all of that data one file at a time. As long as you don't have an ungodly number of files, and the data is formated the same way across each file, it shouldn't be too hard.

Edit: Wait. You have data in a jpg format? why? That seems like an incredibly un-useful way to store any information (other than a picture).


The main reason I posted in this thread: The cake is a lie!

Re: General topic about portal

Posted: Thu Feb 28, 2008 10:11 pm
by Ollie Saunders
The main reason I posted in this thread: The cake is a lie!
The main reason I clicked on it.

As the others have said, this...
Please suggest me how can i convert datas to database ?
...is going to need further qualification in order for us to understand.

Re: General topic about portal

Posted: Thu Feb 28, 2008 10:14 pm
by imagetvr
thanks for your reply

I mean not database to database. For online examination i have questions and answers(multiple choice answer type) in word file. My question how can i store data. Whether i have convert (Questions and answers) to Mysql.

If possible give me one sample

Thanks
senthil kumar

Re: General topic about portal

Posted: Thu Feb 28, 2008 10:57 pm
by Ollie Saunders
Could be difficult. Depending on how consistent the data it might take an experienced programmer a few hours or days to do. I think the general process would be saving the word files into plain text, loading in PHP with file_get_contents(), and then doing a whole load of filtering and extracting of data using the preg_replace() and preg_match() functions.

Re: General topic about portal

Posted: Fri Feb 29, 2008 1:22 am
by Kieran Huggins
ole wrote:
Chalks wrote:The main reason I posted in this thread: The cake is a lie!
The main reason I clicked on it.
:rofl: - me too! I just may have a little bit of a crush on her :oops: On the plus side, she's no crazier than my last two girlfriends... so there's that. Yeah.
ole wrote:$yourPipe->stickInto($that)->smokeIt();
Oh <span style='color:blue' title='I&#39;m naughty, are you naughty?'>smurf</span>, I just freaked out the cat laughing. Damn you ole!

Re: General topic about portal

Posted: Fri Feb 29, 2008 10:41 am
by Ollie Saunders
Oh smurf, I just freaked out the cat laughing. Damn you ole!
I'm glad you like it :). I've had it for a while though.

Re: General topic about portal

Posted: Fri Feb 29, 2008 1:01 pm
by Jonah Bron
Yeah. Pretty good.