Changeset 46
- Timestamp:
- 03/26/06 22:07:44 (2 years ago)
- Files:
-
- trunk/public_html/akarru.lib/database.php (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/public_html/akarru.lib/database.php
r15 r46 31 31 function connect() 32 32 { 33 $this->db= mysql_connect($this->db_host,$this->db_user,$this->db_pass);34 mysql_select_db($this->db_name,$this->db);33 $this->db= @mysql_connect($this->db_host,$this->db_user,$this->db_pass); 34 @mysql_select_db($this->db_name,$this->db); 35 35 return $this->db; 36 36 } … … 45 45 } 46 46 47 48 function get_recordset($sql) 49 { 50 return $this->do_query($sql); 51 } 52 53 function get_record_object($rs) 54 { 55 return @mysql_fetch_object($rs); 56 } 47 57 // use this for select 48 58 // rows is the number of rows selected … … 52 62 $query = $this->do_query($sql); 53 63 $this->rows = mysql_num_rows($query); 54 // echo "rows = ".$this->rows;64 $returned = array(); 55 65 while($row=@mysql_fetch_object($query)) 56 66 { … … 59 69 return $returned; 60 70 } 71 61 72 62 73 function fetch_scalar($sql) … … 79 90 { 80 91 81 $query = mysql_query($sql) or die("error: ".mysql_error());92 $query = @mysql_query($sql) or die("error: ".mysql_error()); 82 93 return $query; 83 94 } 95 84 96 85 97 function count_rows($sql)
