DB_QueryTool Bug + question

From: Date: Tue, 10 Jun 2003 08:16:10 +0000
Subject: DB_QueryTool Bug + question
Groups: php.pear.dev 
Request: Send a blank email to pear-dev+get-17246@lists.php.net to get a copy of this message
When using a primary key which is a varchar with postgres, i get an error, the value part should be enclosed in quotes like WHERE users.username='yavo' instead of users.username=yavo . I also have a question about joins, is it possible to do a SELECT * FROM tab LEFT JOIN tab1 ON tab.key = tab1.key1, as far as I see from the examples you can only do an = join. Yavor Example code // get a single entry with a given 'id' $user->reset(); // reset the query-builder, so no where, order, etc. are set $res = $user->get('yavo'); print_r($res); >c:\php\php.exe -q test.php myPrint: Array ( [0] => users::DB Error: no such field (unknown) ) myPrint: Array ( [0] => users::SELECT users.username AS "username",users.password AS "password",users.description AS "description",users.userquota AS "userquota",users.callid_access AS "callid_access",users.editor AS "editor",users.browse AS "browse",users.send AS "send",users.reports_all AS "reports_all",users.preports_top AS "preports_top",users.reports_top AS "reports_top",users.full_access AS "full_access",users.orders AS "orders" FROM users WHERE ******* users.username=yavo *****[nativecode=ERROR: Attribute 'yavo' not found ] (1710) )

« previous php.pear.dev (#17246) next »