[PHP] [solved][PHP] mysql_query problem with multi dim arrays

2004-04-05 Thread Andy B
> $sql = "INSERT INTO x VALUES ({$_SESSION['add']['name']} "; > > oh, and unless add & name are actually constants you should always wrap > them in single quotes. (php will covert the non-exstent constant into a > string a issue an E_NOTICE + its overhead) well that got me on the right track..

Re: [PHP] mysql_query problem with multi dim arrays

2004-04-05 Thread Jochem Maas
user curly braces around your arrays in the string e.g: $sql = "INSERT INTO x VALUES ({$_SESSION['add']['name']} "; oh, and unless add & name are actually constants you should always wrap them in single quotes. (php will covert the non-exstent constant into a string a issue an E_NOTICE + its

Re: [PHP] mysql_query problem with multi dim arrays

2004-04-05 Thread Richard Harb
Tuesday, April 6, 2004, 1:21:52 AM, you wrote: > hi... > i cant cut and paste my exact mysql query because it takes the '' > stuff out doubles the $'s and the ,'s in the whole thing (dont know > why but anyways...)... > i have a query that goes something like this: > mysql_query("insert into $Gue

[PHP] mysql_query problem with multi dim arrays

2004-04-05 Thread Andy B
hi... i cant cut and paste my exact mysql query because it takes the '' stuff out doubles the $'s and the ,'s in the whole thing (dont know why but anyways...)... i have a query that goes something like this: mysql_query("insert into $GuestbookTable values(NULL, '$_SESSION[add][date]', '$_SESSIO

Re: [PHP] mysql_query() problem

2001-12-17 Thread Girish Nath
al Message - From: "Brian Rue" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Monday, December 17, 2001 8:33 AM Subject: [PHP] mysql_query() problem > Hi, > > I'm getting the error > <> > > from this code: > > function validateUser($us

[PHP] mysql_query() problem

2001-12-16 Thread Brian Rue
Hi, I'm getting the error <> from this code: function validateUser($username,$password) { $conn = connectToMySQL(); mysql_select_db($db_name,$conn); $query="select * from members where username='".$username."' AND password='".$password."'"; $result = mysql_query($query,$conn); if (mysql_nu

Re: [PHP] mysql_query problem (FINALLY FIXED !!!!!!!)

2001-07-17 Thread Brad Wright
is ol' fool. Cheers, Brad > From: "Christopher Allen" <[EMAIL PROTECTED]> > Date: Tue, 17 Jul 2001 09:11:05 -0500 > To: "Brad Wright" <[EMAIL PROTECTED]> > Subject: Re: [PHP] mysql_query problem (more suggestions) > > not right because this

Re: [PHP] mysql_query problem (more suggestions)

2001-07-17 Thread Alvin Tan
> > From: Alvin Tan <[EMAIL PROTECTED]> > > Date: Tue, 17 Jul 2001 14:38:58 +0800 > > To: Brad Wright <[EMAIL PROTECTED]>, Jason Murray > > <[EMAIL PROTECTED]>, PHP General List > > <[EMAIL PROTECTED]> > > Subject: Re: [PHP] mysql_query pr

Re: [PHP] mysql_query problem (more suggestions)

2001-07-16 Thread Brad Wright
lvin Tan <[EMAIL PROTECTED]> > Date: Tue, 17 Jul 2001 14:38:58 +0800 > To: Brad Wright <[EMAIL PROTECTED]>, Jason Murray > <[EMAIL PROTECTED]>, PHP General List > <[EMAIL PROTECTED]> > Subject: Re: [PHP] mysql_query problem (more suggestions) > > Hi ag

Re: [PHP] mysql_query problem (more suggestions)

2001-07-16 Thread Alvin Tan
L PROTECTED]>, PHP General List <[EMAIL PROTECTED]> > > Subject: RE: [PHP] mysql_query problem (more suggestions) > > > >> Unless i have actually defined a function 'password()', calling 'echo > >> password('$password') will (...does, i jus

Re: [PHP] mysql_query problem (more suggestions)

2001-07-16 Thread Brad Wright
Jason, I have tried what yoiu suggested. result is the same. > From: Jason Murray <[EMAIL PROTECTED]> > Date: Tue, 17 Jul 2001 15:28:11 +1000 > To: "'Brad Wright'" <[EMAIL PROTECTED]>, Alvin Tan > <[EMAIL PROTECTED]>, PHP General List <[EMAIL

RE: [PHP] mysql_query problem (more suggestions)

2001-07-16 Thread Jason Murray
> Unless i have actually defined a function 'password()', calling 'echo > password('$password') will (...does, i just double checked) > causes a Fatal > Error 'Undefined Function'. > Nice try tho :) the original mail said to echo $query, which will include some text in it that says "password('i

Re: [PHP] mysql_query problem (more suggestions)

2001-07-16 Thread Brad Wright
7;echo password('$password') will (...does, i just double checked) causes a Fatal Error 'Undefined Function'. Nice try tho :) > From: Alvin Tan <[EMAIL PROTECTED]> > Date: Tue, 17 Jul 2001 13:07:45 +0800 > To: Brad Wright <[EMAIL PROTECTED]> > Subject:

Re: [PHP] mysql_query problem

2001-07-16 Thread Christopher Allen
> $testResult = mysql_query("SELECT * FROM login_table where Pass = $query = "select * from login_table where Pass=password('$password')"; then echo $query to the screen and make sure you see what needs to be there. Also try mysql_error etc.. from the manual GL --ccma -- PHP General Mail

[PHP] mysql_query problem

2001-07-16 Thread Brad Wright
Hi all', I have a mysql_query that reads: $testResult = mysql_query("SELECT * FROM login_table where Pass = password('$password')") or die ("ouch"); $num_rows = mysql_num_rows($testResult); the problem is that I keep getting a value of 0 for $num_rows when I know the table has 1 entry for PAs