need help about php poll script

Questions about the MySQL, PostgreSQL, and most other databases, as well as using it with PHP can be asked here.

Moderator: General Moderators

Post Reply
jehzlau
Forum Newbie
Posts: 3
Joined: Tue May 30, 2006 3:29 am

need help about php poll script

Post by jehzlau »

hi, im a newbie in this php stuff, i would like to know how to

I want to install a SimPoll poll from http://www.sim-php.info to my own webserver, one of the instructions is:

Execute these queries on your database:
<?php
# Table structure for table `poll_check`

CREATE TABLE `poll_check` (
`pollid` int(11) NOT NULL default '0',
`ip` varchar(20) NOT NULL default '',
`time` varchar(14) NOT NULL default ''
) TYPE=MyISAM COMMENT='';

# -----------------------------------------

# Table structure for table `poll_data`

CREATE TABLE `poll_data` (
`pollid` int(11) NOT NULL default '0',
`polltext` varchar(50) NOT NULL default '',
`votecount` int(11) NOT NULL default '0',
`voteid` int(11) NOT NULL default '0',
`status` varchar(6) default NULL
) TYPE=MyISAM COMMENT='';

# -----------------------------------------

# Table structure for table `poll_desc`

CREATE TABLE `poll_desc` (
`pollid` int(11) NOT NULL default '0',
`polltitle` varchar(100) NOT NULL default '',
`timestamp` datetime NOT NULL default '0000-00-00 00:00:00',
`votecount` mediumint(9) NOT NULL default '0',
`STATUS` varchar(6) default NULL,
PRIMARY KEY (`pollid`)
) TYPE=MyISAM COMMENT='';

# -----------------------------------------
?>

The problem is, i dont know how to execute this code/queries onto my database.. huhuhu, nid help badly, i really dont know T__T
User avatar
twigletmac
Her Royal Site Adminness
Posts: 5371
Joined: Tue Apr 23, 2002 2:21 am
Location: Essex, UK

Post by twigletmac »

Do you have access to something like phpMyAdmin?

Mac
jehzlau
Forum Newbie
Posts: 3
Joined: Tue May 30, 2006 3:29 am

yep

Post by jehzlau »

yep, i do have an access to that so called phpMyAdmin, coz its my own webserver... =), but i dont know how to execute the mentioned queries T___T,, im a newbie in this mysql+php thing...=(
GM
Forum Contributor
Posts: 365
Joined: Wed Apr 26, 2006 4:19 am
Location: Italy

Post by GM »

One way to do it is to open your mySQL console (I assume you are using mySQL), and copy/paste the queries into it.
jehzlau
Forum Newbie
Posts: 3
Joined: Tue May 30, 2006 3:29 am

hmm

Post by jehzlau »

what is that mysql console thing? is it a folder named mysql_console.php? or .txt? i cant find it T____T :cry:
User avatar
hawleyjr
BeerMod
Posts: 2170
Joined: Tue Jan 13, 2004 4:58 pm
Location: Jax FL & Spokane WA USA

Re: hmm

Post by hawleyjr »

jehzlau wrote:what is that mysql console thing? is it a folder named mysql_console.php? or .txt? i cant find it T____T :cry:
Your phpMyAdmin
Post Reply