hholzgra Fri Sep 20 08:09:03 2002 EDT
Modified files:
/functable table.php
Log:
sql cosmetics
Index: functable/table.php
diff -u functable/table.php:1.13 functable/table.php:1.14
--- functable/table.php:1.13 Fri Sep 20 07:40:53 2002
+++ functable/table.php Fri Sep 20 08:09:03 2002
@@ -86,7 +86,7 @@
# get languages, initialize translation counters
$translation = array();
- $result=mysql_query("select distinct language from quickref");
+ $result=mysql_query("SELECT DISTINCT language FROM quickref");
if(!$result) { echo mysql_error(); exit;}
while($row=mysql_fetch_array($result)) {
$translation[$row["language"]]=0;
@@ -374,7 +374,12 @@
mysql_free_result($result);
echo "getting function versions\n";
- $result = mysql_query("select function,version,versionid from funclist order
by function,versionid");
+ $result = mysql_query("SELECT function
+ , version
+ , versionid
+ FROM funclist
+ ORDER BY function, versionid
+ ");
if(!$result) { echo mysql_error(); }
while($row=mysql_fetch_array($result)) {
$entry[strtolower(trim($row["function"]))][$row["version"]]=true;
@@ -382,7 +387,12 @@
mysql_free_result($result);
echo "getting implementation files for PHP 3\n";
- $result = mysql_query("select function,filename,lineno from funclist where
versionid=399");
+ $result = mysql_query("SELECT function
+ , filename
+ , lineno
+ FROM funclist
+ WHERE versionid = 399
+ ");
if(!$result) { echo mysql_error(); }
while($row=mysql_fetch_array($result)) {
$file3[strtolower(trim($row["function"]))]=str_replace("php_3_cvs","php3","$row[filename]#$row[lineno]");
@@ -390,7 +400,12 @@
mysql_free_result($result);
echo "getting implementation files for php 4\n";
- $result = mysql_query("select function,filename,lineno from funclist where
versionid=499");
+ $result = mysql_query("SELECT function
+ , filename
+ , lineno
+ FROM funclist
+ WHERE versionid = 499
+ ");
if(!$result) { echo mysql_error(); exit; }
while($row=mysql_fetch_array($result)) {
$function = strtolower(trim($row["function"]));
@@ -399,14 +414,24 @@
}
mysql_free_result($result);
- $result = mysql_query("select function,file,lineno from funcimp where
versionid=499");
+ $result = mysql_query("SELECT function
+ , file
+ , lineno
+ FROM funcimp
+ WHERE versionid = 499
+ ");
while($row=mysql_fetch_array($result)) {
$imp4[strtolower(trim($row["function"]))]=str_replace("php_4_cvs","php4","$row[file]#$row[lineno]");
}
mysql_free_result($result);
echo "getting function docfiles\n";
- $result = mysql_query("select function,docfile,lineno from docfile where
docfile is not null");
+ $result = mysql_query("SELECT function
+ , docfile
+ , lineno
+ FROM docfile
+ WHERE docfile IS NOT NULL
+ ");
if(!$result) { echo mysql_error(); exit; }
while($row=mysql_fetch_array($result)) {
if(""!=trim($row["docfile"])) {
@@ -415,7 +440,11 @@
}
mysql_free_result($result);
- $result = mysql_query("select distinct function,proto,proto_desc from proto3");
+ $result = mysql_query("SELECT DISTINCT function
+ , proto
+ , proto_desc
+ FROM proto3
+ ");
if(!$result) { echo mysql_error(); exit; }
while($row=mysql_fetch_array($result)) {
$proto3[strtolower(trim($row["function"]))]=
@@ -423,7 +452,11 @@
}
mysql_free_result($result);
- $result = mysql_query("select distinct function,proto,proto_desc from proto4");
+ $result = mysql_query("SELECT DISTINCT function
+ , proto
+ , proto_desc
+ FROM proto4
+ ");
if(!$result) { echo mysql_error(); exit; }
while($row=mysql_fetch_array($result)) {
$proto4[strtolower(trim($row["function"]))]=
@@ -432,7 +465,11 @@
mysql_free_result($result);
echo "getting function quickrefs\n";
- $result = mysql_query("select function,language,descr from quickref");
+ $result = mysql_query("SELECT function
+ , language
+ , descr
+ FROM quickref
+ ");
if(!$result) { echo mysql_error(); exit; }
while($row=mysql_fetch_array($result)) {
$quickref[$row["language"]][strtolower(trim($row["function"]))]=$row["descr"];
@@ -440,7 +477,10 @@
mysql_free_result($result);
echo "getting function authors\n";
- $result = mysql_query("select function,author from author");
+ $result = mysql_query("SELECT function
+ , author
+ FROM author
+ ");
if(!$result) { echo mysql_error(); exit; }
while($row=mysql_fetch_array($result)) {
$author[$row['function']] = $row['author'];
@@ -472,7 +512,11 @@
echo "getting alias entries\n";
- $result = mysql_query("select distinct function,alias_for from funclist where
alias_for is not null");
+ $result = mysql_query("SELECT DISTINCT function
+ , alias_for
+ FROM funclist
+ WHERE alias_for IS NOT NULL
+ ");
if(!$result) { echo mysql_error(); exit; }
while($row=mysql_fetch_array($result)) {
$alias[strtolower(trim($row["function"]))]=strtolower(trim($row["alias_for"]));
@@ -480,7 +524,11 @@
mysql_free_result($result);
echo "getting alias entries\n";
- $result = mysql_query("select distinct function,alias_for from funclist where
alias_for is not null");
+ $result = mysql_query("SELECT DISTINCT function
+ , alias_for
+ FROM funclist
+ WHERE alias_for IS NOT NULL
+ ");
if(!$result) { echo mysql_error(); exit; }
while($row=mysql_fetch_array($result)) {
$alias[strtolower(trim($row["function"]))]=strtolower(trim($row["alias_for"]));
@@ -488,7 +536,12 @@
mysql_free_result($result);
echo "getting extension extension names\n";
- $result = mysql_query("select distinct
substring_index(substring_index(filename,'/',-2),'/',1) as
extension,substring_index(filename,'/',3) as dirname from funclist where versionid=499
order by extension");
+ $result = mysql_query("SELECT DISTINCT
+substring_index(substring_index(filename,'/',-2),'/',1) AS extension
+ , substring_index(filename,'/',3) AS dirname
+ FROM funclist
+ WHERE versionid = 499
+ ORDER BY extension
+ ");
if(!$result) { echo mysql_error(); exit; }
while($row=mysql_fetch_array($result)) {
if(trim($row["extension"])!="Zend")
--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php