Re: [PHP-DB] Using placeholder without pass by reference in MySqli

2010-11-27 Thread None
?> "Bastien" wrote in message news:962f0fd6-0eaa-495a-831e-da05bc1ab...@gmail.com... On 2010-11-26, at 7:46 PM, "None" wrote: > ?Could be a silly question, but i can't find a method to use placeholder > (MySqli) without passing by reference (bind_param) or receive by > reference (bind_resu

[PHP-DB] Re: [PHP] Strange Query Error...

2010-11-27 Thread Daniel P. Brown
On Sat, Nov 27, 2010 at 12:30, Don Wieland wrote: > Hi gang, > > I am executing a query via PHP that gives me a PHP error: > > You have an error in your SQL syntax; check the manual that corresponds to > your MySQL server version for the right syntax to use near 'AND > m.`Preferred_First_Name` LIK

[PHP-DB] Re: [PHP] Strange Query Error...

2010-11-27 Thread Don Wieland
On Nov 27, 2010, at 10:08 AM, Daniel P. Brown wrote: one primary question: are you using the mysql_* family, mysqli_* family, or another method of interfacing with MySQL? mysql_ $results = mysql_query($query) or die(mysql_error()); Don -- PHP Database Mailing List (http://www.php.net/) To u

Re: [PHP-DB] Re: [PHP] Strange Query Error...

2010-11-27 Thread Niel Archer
> On Nov 27, 2010, at 10:08 AM, Daniel P. Brown wrote: > > > one primary question: are you using the mysql_* > > family, mysqli_* family, or another method of interfacing with MySQL? > > mysql_ > > $results = mysql_query($query) or die(mysql_error()); > > Don > > -- > PHP Database Mailing Lis

[PHP-DB] Re: [PHP] Strange Query Error...

2010-11-27 Thread Daniel P. Brown
On Sat, Nov 27, 2010 at 13:18, Don Wieland wrote: > On Nov 27, 2010, at 10:07 AM, Bastien wrote: > >> Try removing the backticks around the table names. If you do use them, >> then all values (field names and table names) need it. > > I tried that and still chokes... > > select m.* from Members m

[PHP-DB] Re: [PHP] Strange Query Error...

2010-11-27 Thread Don Wieland
On Nov 27, 2010, at 10:44 AM, Daniel P. Brown wrote: Note how you keep changing case here. For example, m.aucciim_id vs. m.AUCCIIM_ID. Also note that all of this is cAsE-sEnSiTiVe. You are right. But it still chokes in PHP: select m.* from Members m inner join Member_Years my on m.AUCCII

[PHP-DB] ON DUPLICATE KEY UPDATE

2010-11-27 Thread Ron Piggott
My question is with the syntax below: If the “ON DUPLICATE KEY UPDATE `name` = '$name'” occurs will $_SESSION['referral_clients_reference'] be populated with the mysql_insert_id() value? If not, should I just query for it? Ron mysql_query("INSERT INTO `referral_clients` ( `reference` , `name`

Re: [PHP-DB] ON DUPLICATE KEY UPDATE

2010-11-27 Thread kesavan trichy rengarajan
Read through this: http://dev.mysql.com/doc/refman/5.0/en/insert-on-duplicate.html, especially the last 2 paragraphs. On Sun, Nov 28, 2010 at 12:40 PM, Ron Piggott < ron.pigg...@actsministries.org> wrote: > My question is with the syntax below: If the “ON DUPLICATE KEY UPDATE > `name` = '$name'”

Re: [PHP-DB] Re: [PHP] Strange Query Error...

2010-11-27 Thread Karl DeSaulniers
On Nov 27, 2010, at 1:24 PM, Don Wieland wrote: On Nov 27, 2010, at 10:44 AM, Daniel P. Brown wrote: Note how you keep changing case here. For example, m.aucciim_id vs. m.AUCCIIM_ID. Also note that all of this is cAsE-sEnSiTiVe. You are right. But it still chokes in PHP: select m.* fr