/[libdata]/branches/pear-db/include/xx_mysql.php
This is repository of my old source code which isn't updated any more. Go to git.rot13.org for current projects!
ViewVC logotype

Annotation of /branches/pear-db/include/xx_mysql.php

Parent Directory Parent Directory | Revision Log Revision Log


Revision 82 - (hide annotations)
Thu Mar 18 23:15:39 2004 UTC (20 years, 1 month ago) by dpavlin
File size: 919 byte(s)
additional debugging

1 dpavlin 39 <?php
2    
3     # convert calls to xx_ SQL to mysql
4    
5     function xx_connect ( $db_srv, $db_usr, $db_pwd ) {
6     return mysql_connect ( $db_srv, $db_usr, $db_pwd );
7     }
8    
9     function xx_errno() {
10     return mysql_errno();
11     }
12    
13 dpavlin 77 define("xx_ASSOC", mysql_ASSOC);
14    
15     function xx_fetch_array ($rs, $t = 0) {
16     if ($t == 0) {
17     $ret = mysql_fetch_array($rs);
18     } else {
19     $ret = mysql_fetch_array($rs, $t);
20     }
21     print "result:";
22     var_dump($ret);
23     return($ret);
24 dpavlin 39 }
25    
26    
27     function xx_insert_id($con) {
28     return mysql_insert_id($con);
29     }
30    
31     function xx_num_rows($rs) {
32     return mysql_num_rows($rs);
33     }
34    
35     function xx_query($sql, $con) {
36 dpavlin 82 $ret = mysql_query($sql, $con);
37     if (! $ret) {
38     print "Error in SQL: <pre>$sql</pre>";
39     }
40     return $ret;
41 dpavlin 39 }
42    
43     function xx_select_db ( $db_nam, $con ) {
44     return mysql_select_db ( $db_nam, $con );
45     }
46    
47     function xx_data_seek($rs, $element_nr) {
48     return mysql_data_seek($rs, $element_nr);
49     }
50    
51     function xx_error() {
52     return mysql_error();
53     }
54    
55     ?>

  ViewVC Help
Powered by ViewVC 1.1.26