[PHP-DB] SELECT LIKE with % and without %

2009-05-02 Thread Emiliano Boragina
Hello. I am using this: $sql = SELECT * FROM table WHERE ID LIKE '%$_GET[id]%' AND title LIKE '%$_GET[word]%'; But I want exactlu ID, not one part of many possibles Ids in the DB. How can I do that? Thanks +      _    //

Re: [PHP-DB] SELECT LIKE with % and without %

2009-05-02 Thread mrfroasty
Emiliano Boragina wrote: Hello. I am using this: $sql = SELECT * FROM table WHERE ID LIKE '%$_GET[id]%' AND title LIKE '%$_GET[word]%'; This doesnt work? $sql = SELECT * FROM table WHERE ID='some_id' AND title='some_title'; -- Extra details: OSS:Gentoo Linux profile:x86 Hardware:msi

Re: [PHP-DB] PostgreSQL query many escape characters?

2009-05-02 Thread John DeSoi
On May 1, 2009, at 3:59 PM, Carol Walter wrote: It would be much easier to read and write like this: $query = 'INSERT INTO tblPeople(fName,mName,lName, ivlweb, cnsweb)' . VALUES ($new_f_name_new, $new_m_name_new, $new_l_name_new, $new_ivl_web_peop, $new_cns_web_peop);; First query: