Jump to content

Archived

This topic is now archived and is closed to further replies.

mauri_gato

help me please!!!!

Recommended Posts

I am developing a site that uses multiple queries. [b]It works fine on my remote server of my company[/b]. But when i use my own prove server with Apache or even IIS and PHP 4 and even 5 i get the same error when executing a query:

[b]Notice: Undefined variable: Clinica in e:\Inetpub\wwwroot\Prueba\Bienvenida5.php on line 79

Warning: mysql_query(): supplied argument is not a valid MySQL-Link resource in e:\Inetpub\wwwroot\Prueba\Bienvenida5.php on line 79[/b]

I don't know what might be happening, i have the exact copy of the site in my system.

Here is the section code that doesn't run:

[code]
          <TR>
            <TD height="
            <?php
                mysql_select_db($database_clinica, $clinica);
                $query_rsMenu = "SELECT COUNT(m.menCod) * 21 AS Total FROM Menu m, Privilegio p, Grupo g, Miembro i, Usuario u WHERE m.menSuperior IS NULL AND m.menCod = p.menCod AND p.gruCod = g.gruCod AND i.gruCod = g.gruCod AND i.usuCod = u.usuCod AND u.usuNombre = '".$_SESSION['usuNombre']."'";
                $rsMenu = mysql_query($query_rsMenu, $Clinica) or die(mysql_error());
                $row_rsMenu = mysql_fetch_assoc($rsMenu);
                echo $row_rsMenu['Total'];
            ?>">&nbsp;<?php echo($query_rsMenu); ?></TD>
          </TR>

[/code]

The code should generate the height of a column in base of $_SESSION['usuNombre'].

Help me please, thank you guys.

Share this post


Link to post
Share on other sites
You have two variables which are the same but are typed differently. The variables I am talking about are $clinica and $Clinica

Notice one has a lowercase c and the other has an uppercase c

PHP sees those variables as two completly different variables. PHP is case-sensitive with variablesname so if you change $Clinica to $clinica PHP should now be able to use your mysql link resource which is stored in the $clinica variable.

Share this post


Link to post
Share on other sites
Thank you wildteen88, it was my mistake. I had 2 conexion files in my server (that dreamweaver made) and just one in my computer. That's why one was uppercase and the other was not.

Really appreciated your help, thanks a lot.

Share this post


Link to post
Share on other sites

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.