Re: SELECT statement
| From: | Ron Brogden | Date: | Wed, 04 Apr 2001 22:39:59 +0000 |
| Subject: | Re: SELECT statement | ||
| References: | 1 | Groups: | php.db |
| Request: | Send a blank email to php-db+get-8220@lists.php.net to get a copy of this message | ||
At 03:24 PM 4/4/2001 -0700, Julio Cuz, Jr. wrote:
Every time I run the following code, I get this error if I use a NUMBER for the 'Email' case: "Warning: Unable to jump to row 0 on PostgreSQL result index 2 in /html/rccd/remodel/display2.php on line 35"The problem is that your query is equivalent to going: SELECT * FROM "Remodel" WHERE "WO" LIKE 1; // or some other numerical value The "WO" is a string because it is in quotes so you are saying: WHERE string = integer Ain't gonna happen so the result is always empty. What you want probably is (assuming WO is a column name): $sql = "SELECT * FROM \"Remodel\" WHERE WO=\"".$find."\""; It is equals since you are using an integer instead of a string (like is for strings).
or, if I use a string (i.e. jcuz@rccd.cc.ca.us), I get this error message: "Warning: PostgreSQL query failed: ERROR: Attribute 'jcuz' not found in /html/rccd/remodel/display2.php on line 33"Same problem. "EMAIL" means the string "EMAIL" not the column called "EMAIL". Cheers, Ron -----------------------------------------------------------------------------
Island Net AMT Solutions Group Inc. Telephone: 250 383-0096 1412 Quadra Toll Free: 1 800 331-3055 Victoria, B.C. Fax: 250 383-6698 V8W 2L1 E-Mail: support@islandnet.com Canada WWW: http://www.islandnet.com/-----------------------------------------------------------------------------