By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
438,521 Members | 1,460 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 438,521 IT Pros & Developers. It's quick & easy.

Noob query: Voting or Poll Scripts

P: n/a
Hello All:

I am new to Php, but working my way out slowly. I saw some polling or
voting scripts on the net and all of them use MySQL database with it. I
was wondering if a file can be used (to save use of a database, I have
only 10-databases from godaddy and I cannot use one for each poll).

It seems that this can be done (using file instead of a DB), but I don't
want to re-invent the wheel. So if someone has a suggestion, please help
me out.

Best regards,
Animesh
Feb 14 '07 #1
Share this Question
Share on Google+
3 Replies


P: n/a
Message-ID: <eq**********@agate.berkeley.edufrom Animesh K contained
the following:
>I am new to Php, but working my way out slowly. I saw some polling or
voting scripts on the net and all of them use MySQL database with it. I
was wondering if a file can be used (to save use of a database, I have
only 10-databases from godaddy and I cannot use one for each poll).
I wrote a poll which enabled you to have as many polls as you like using
just two tables. I suspect others will be similar. Also you can have
many tables in a database (I usually just use a naming convention to
keep them separate.)

--
Geoff Berrow (put thecat out to email)
It's only Usenet, no one dies.
My opinions, not the committee's, mine.
Simple RFDs http://www.ckdog.co.uk/rfdmaker/
Feb 14 '07 #2

P: n/a

Animesh K wrote:

Hello All:
I am new to Php, but working my way out slowly. I saw some polling or
voting scripts on the net and all of them use MySQL database with it. I
was wondering if a file can be used (to save use of a database, I have
only 10-databases from godaddy and I cannot use one for each poll).
It seems that this can be done (using file instead of a DB), but I
don't
want to re-invent the wheel. So if someone has a suggestion, please
help
me out.
Best regards,
Animesh
10 databases is not really a problem here. You can identify tables that
belong to a single script inside a single database using a unique name
prefix. This is how it has been done years ago when a single MySQL
database that your host allowed was look upon as a huge favor.

In any case, if you are trying to avoid using a database, you will need
your script to be able to write onto the hard drive and that creates
possibility for NASTY website hacks. I would avoid a script that
unnecessarily writes anything to a disk. Don't shy away from database use.
There are plenty of benefits there.

As for where to get a ready-to-go script, www.hotscripts.com has plenty.

--
Cheers,
Dmitri
See Site Sig Below
--
+------------------------------------------------+
| Follow comp.lang.php threads |
| with your Firefox Live Bookmarks! Set it up at |
| http://www.1-script.com/forums/ |
+------------------------------------------------+

Feb 14 '07 #3

P: n/a
www.1-script.com wrote:
Animesh K wrote:

>Hello All:
>I am new to Php, but working my way out slowly. I saw some polling or
voting scripts on the net and all of them use MySQL database with it. I
>was wondering if a file can be used (to save use of a database, I have
only 10-databases from godaddy and I cannot use one for each poll).
>It seems that this can be done (using file instead of a DB), but I
don't
want to re-invent the wheel. So if someone has a suggestion, please
help
me out.
>Best regards,
Animesh

10 databases is not really a problem here. You can identify tables that
belong to a single script inside a single database using a unique name
prefix. This is how it has been done years ago when a single MySQL
database that your host allowed was look upon as a huge favor.

In any case, if you are trying to avoid using a database, you will need
your script to be able to write onto the hard drive and that creates
possibility for NASTY website hacks. I would avoid a script that
unnecessarily writes anything to a disk. Don't shy away from database use.
There are plenty of benefits there.

As for where to get a ready-to-go script, www.hotscripts.com has plenty.
Thanks for the quick reply. I will adhere to your and Geoff's suggestions.

Best regards,
Animesh
Feb 14 '07 #4

This discussion thread is closed

Replies have been disabled for this discussion.