php-windows Digest 12 Feb 2001 09:28:52 -0000 Issue 441

Topics (messages 5507 through 5509):

Re: addslashes() and binary data
        5507 by: Ignatius Teo

Re: php access query problem
        5508 by: Bob Hall

How to save a file to a blob field?
        5509 by: Winston Valenzuela

Administrivia:

To subscribe to the digest, e-mail:
        [EMAIL PROTECTED]

To unsubscribe from the digest, e-mail:
        [EMAIL PROTECTED]

To post to the list, e-mail:
        [EMAIL PROTECTED]


----------------------------------------------------------------------


dHJ5IGJhc2U2NF9lbmNvZGUoJGJpbmFyeV9kYXRhKS4uLg0KDQpJZ25hdGl1cw0KDQo+IC0tLS0t
T3JpZ2luYWwgTWVzc2FnZS0tLS0tDQo+IEZyb206IFJhbmRhbGwgQmFyYmVyIFttYWlsdG86cmRi
NTVAZW1haWwuYnl1LmVkdV0NCj4gU2VudDogU2F0dXJkYXksIDEwIEZlYnJ1YXJ5IDIwMDEgMTI6
MjMNCj4gVG86IHBocC13aW5kb3dzQGxpc3RzLnBocC5uZXQNCj4gU3ViamVjdDogW1BIUC1XSU5d
IGFkZHNsYXNoZXMoKSBhbmQgYmluYXJ5IGRhdGENCj4gDQo+IA0KPiBBIGN1cmlvdXMgbWFuIGlz
IG1lLg0KPiANCj4gSSBoYXZlIHNvbWUgYmluYXJ5IGRhdGEgdGhhdCBJIHdpc2ggdG8gaW5zZXJ0
IGludG8gYSANCj4gZGF0YWJhc2UsIGFuZCBhbGwgZXhhbXBsZXMgSSBoYXZlIHNlZW4gaGF2ZSB1
c2VkOg0KPiANCj4gJHRvX3NhdmUgPSBhZGRzbGFzaGVzKCRiaW5hcnlfZGF0YSk7DQo+IA0KPiBU
aGlzIGlzIHN1cHBvc2VkIHRvIGVzY2FwZSBhbGwgdGhlIGNoYXJhY3RlcnMgdGhhdCBkYXRhYmFz
ZXMgDQo+IGRvbid0IGxpa2UuICANCj4gDQo+IFRoaXMgZnVuY3Rpb24gZG9lcyBub3QgYWx3YXlz
IHdvcmsuICBTb21lIHRpbWVzIGl0IGlzIGZpbmUsIA0KPiBvdGhlciB0aW1lcyBpdCBjYXVzZXMg
bXkgU1FMIHN0YXRlbWVudCB0byBiZSBjb21wbGV0ZWx5IA0KPiB3cm9uZywgb3IgaXQgZXZhbHVh
dGVzIHRoZSAoJyR0b19zYXZlJykgdmFyaWFibGUgYXMgTlVMTCBhbmQgDQo+IHJldHVybnMgU1FM
IENPVU5UIGZpZWxkIGluY29ycmVjdC4NCj4gDQo+IEFtIEkgbWlzc2luZyBzb21ldGhpbmc/ICBD
YW4gc29tZW9uZSB0ZWxsIG1lIGhvdyB0aGV5IA0KPiBndWFyYW50ZWUgdGhhdCBhbGwgdGhlIGJh
ZCBjaGFyYWN0ZXJzIHdpbGwgYmUgZXNjYXBlZD8NCj4gVGhhbmtzIGluIGFkdmFuY2UNCj4gUkRC
DQo+IA==





>Date: Sun, 11 Feb 2001 10:02:56 -0500
>To: [EMAIL PROTECTED]
>From: Bob Hall <[EMAIL PROTECTED]>
>Subject: RE: Re[2]: [PHP-WIN] php access query problem
>Cc:
>Bcc:
>X-Attachments:
>
>
>>  >> I have the query
>>  >> $cur= odbc_exec( $cnx, "SELECT Location, 'Dept ID', 'Equip Type' FROM
>>  >> Equipment01 WHERE Location = '415C'");
>
>Sir, you have the second and third items in your SELECT clause in 
>quotes, so the the SELECT statement will return the literal strings 
>'Dept ID' and 'Equip Type', rather than column values.
>
>>  >> which returns the proper results but when I add  AND 'Equip Type' =
>>'C' to
>>  >> the end of it I get no results.  Is my syntax correct?  Thanks, Aaron
>>
>>  >> $cur= odbc_exec( $cnx, "SELECT Location, 'Dept ID', 'Equip Type' FROM
>>  >> Equipment01 WHERE Location = '415C' AND 'Equip Type' = 'C'");
>
>In your WHERE clause, you are comparing the literal string 'Equip 
>Type' with the literal string 'C'. Since they are not the same, the 
>WHERE clause always returns FALSE, and no rows are selected.
>
>Don't put your column names in quotes. That forces the DBMS to 
>evaluate them as literal strings, rather than as column names.
>
>Bob Hall

Know thyself? Absurd direction!
Bubbles bear no introspection.     -Khushhal Khan Khatak




I'm using ODBC to connect to my Interbase 6 database. Using the code:

$post_stmt = "Insert into
MSGTABLE(firstname,middlename,lastname,msg_subject,msgbody,remote_ip)
values('$fname','$mname','$lname','$subj','$mssg','$remote_ip')";

and the msgbody field is a blob type. and the data came from a textarea
field. But i got an error using this insert statement.

How can i do it without an error?




Reply via email to