RE: Re: Problem with query

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Yeah, Jim, please explain what u mean by "Per the manual, associative arrays
using string indices should always use ' ' around them.  They work (as
mentioned in the manual) but are wrong". As long as I remember  I could use
associative arrays in that way (ex. $_SESSION['Cust_Num']). There's another
way to do that using string indices? Why do you say it's wrong? It's
obsolete?

I would like to make a call to all the members of this mailing list:
knowledge is a wonderful gift so, why we don't share it politely and
efficiency. Jim, I will take you as an example. You start saying " Against
my better judgement, here I go again". If it's against your better judgment
please don't go anywhere, your conscience is a good adviser. After that you
talked a little about standards and some manual. If you are not happy to
help people who make some mistakes regarding to programming standards, you
should inform them where they can find the glorious manual and what is the
correct syntax to do what people need to do. This is a better way to show to
others what you know in a humble way but I suppose that wasn't what you were
trying to do. I consider this list is to HELP others and share what we know.
"Never break the silence if it's not to make it better".

Ethan, I will check your problem and I'll write you back as soon as I can
'cause right now I don't have anything installed in my computer. I'll try to
do it tomorrow, ok? Be nice and stay well!!!

Osain.

-----Mensaje original-----
De: Ethan Rosenberg, PhD [mailto:erosenberg@xxxxxxxxxxxxxxxxxxxx] 
Enviado el: domingo, junio 23, 2013 4:38 PM
Para: php-db@xxxxxxxxxxxxx; Jim Giner
Asunto:  Re: Problem with query

On 6/23/2013 2:31 PM, Ethan Rosenberg, PhD wrote:
> Dear List -
>
> There is an error in my query, and I cannot find it.
>
> This fails:
>
> $_SESSION['Cust_Num'] = $_REQUEST['cnum']; $_SESSION['CustNum'] = 
> $_REQUEST['cnum'];
>
> echo "session<br />"; //this has the proper values print_r($_SESSION);
>
> $sql10 = "select Balance, Payments, Charges, Date from Charges where 
> Cust_Num = $_SESSION[Cust_Num] order by Date"; echo $sql10; //echos 
> the correct query
> $result10 = mysqli_query($cxn, $sql10); var_dump($result1); // this 
> returns NULL

Against my better judgement, here I go again.

Is this the "actual" code you executed, or is it once again a typeover?

Your 1st error is in these two lines:
> $result10 = mysqli_query($cxn, $sql10); var_dump($result1); // this 
> returns NULL

Yes your dump returns null.  And always will.


Any further errors might be related to your non-standard syntax for the
session variable.  Per the manual, associative arrays using string indices
should always use ' ' around them.  They work (as mentioned in the manual)
but are wrong.
=======
Jim -


Is this the "actual" code you executed, or is it once again a typeover?

	The actual code

Any further errors might be related to your non-standard syntax for the
session variable.  Per the manual, associative arrays using string indices
should always use ' ' around them.  They work (as mentioned in the manual)
but are wrong.

	Newbie is confused.

	Please explain.

TIA

Ethan

--
PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit:
http://www.php.net/unsub.php


--

Este mensaje le ha llegado mediante el servicio de correo electronico que ofrece Infomed para respaldar el cumplimiento de las misiones del Sistema Nacional de Salud. La persona que envia este correo asume el compromiso de usar el servicio a tales fines y cumplir con las regulaciones establecidas

Infomed: http://www.sld.cu/


-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php





[Index of Archives]     [PHP Home]     [PHP Users]     [Postgresql Discussion]     [Kernel Newbies]     [Postgresql]     [Yosemite News]

  Powered by Linux