%s\n", $menurow["value"], $menurow["listname"]); } while ($menurow = mysql_fetch_array($menuresult)); } function displaydata() { global $state; global $db; if ($state != '') { $sql = "SELECT powerresidential.state AS 'state', powerresidential.rate AS 'residential', powerresidential.rank AS 'residential_rank', powercommercial.rate AS 'commercial', powercommercial.rank AS 'commercial_rank', powerindustrial.rate AS 'industrial', powerindustrial.rank AS 'industrial_rank', blurb, doe, local, localname FROM powerresidential, powercommercial, powerindustrial, powerderegulation, powerlinks WHERE powerresidential.state='$state' AND powerindustrial.state='$state' AND powercommercial.state='$state' AND powerderegulation.state='$state' AND powerlinks.state='$state'"; $result = mysql_query($sql, $db) ; echo mysql_error(); $row = mysql_fetch_array($result); echo mysql_error(); } if ($state != '') { print('

'.$row["state"].'

'); print('

Electricity Rates

Residential = '); echo $row["residential"]; print(' cents/kwh '); if ($state != "District of Columbia") { printf("(National ranking: %s)", $row["residential_rank"]); } else { print("Ranking not available"); } print('

Commerical = '); echo $row["commercial"]; print(' cents/kwh
'); if ($state != "District of Columbia") { printf("(National ranking: %s)", $row["commercial_rank"]); } else { print("Ranking not available"); } print('

Industrial = '); echo $row["industrial"]; print(' cents/kwh'); if ($state != "District of Columbia") { printf("(National ranking: %s)", $row["industrial_rank"]); } else { print("Ranking not available"); } print('

kwh = kilowatt hour
1st ranking = highest rate in catagory
'); print('

Deregulation

'.$row["blurb"]); print('

More Information

'); printf('Department of Energy Information on %s', $row["doe"], $row["state"]); printf('

%s

', $row["local"], $row["localname"]); print('

Select another state

'); } else { print('

Click on the map to learn about power deregulation in your state.

'); } } if ($SERVER_NAME == 'lockbox') { dataconnect('lockbox', 'root', '', 'power'); } else { dataconnect('mysql1-private', 'newshour', 'senaP2e4', 'newshour'); } ?> Online NewsHour -- Power, 2001

Power and DeregulationOnline NewsHour

Green = Deregulation laws/orders in place
Yellow = Not deregulated