Jump to content

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.
Link to comment
https://forums.phpfreaks.com/topic/10841-help-me-please/
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.
Link to comment
https://forums.phpfreaks.com/topic/10841-help-me-please/#findComment-40567
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

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.