OSDN Git Service

modified: 評判が悪い無効な行をやめる//DBRecord.class.php
authorepgrec@park.mda.or.jp <yoneda@localhost.localdomain>
Sun, 2 Oct 2011 07:50:54 +0000 (16:50 +0900)
committerepgrec@park.mda.or.jp <yoneda@localhost.localdomain>
Sun, 2 Oct 2011 07:50:54 +0000 (16:50 +0900)
DBRecord.class.php

index 8dbfc6f..e094891 100755 (executable)
@@ -34,7 +34,7 @@ class DBRecord {
                        
                        $res = $this->__query( $sqlstr );
                        $arr = mysql_fetch_array( $res , MYSQL_ASSOC );
-                       if( $arr === FALSE ) throw new exception( "construct:無効な行" );
+                       if( $arr === FALSE ) throw new exception( "construct:".$table."に".$property."=".$value."はありません" );
                        // 最初にヒットした行のidを使用する
                        $this->id = $arr['id'];
                }
@@ -148,4 +148,4 @@ class DBRecord {
                $this->id = 0;
        }
 }
-?>
\ No newline at end of file
+?>