mauri_gato Posted May 31, 2006 Share Posted May 31, 2006 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 79Warning: 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']; ?>"> <?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. Quote Link to comment https://forums.phpfreaks.com/topic/10841-help-me-please/ Share on other sites More sharing options...
wildteen88 Posted May 31, 2006 Share Posted May 31, 2006 You have two variables which are the same but are typed differently. The variables I am talking about are $clinica and $ClinicaNotice one has a lowercase c and the other has an uppercase cPHP 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. Quote Link to comment https://forums.phpfreaks.com/topic/10841-help-me-please/#findComment-40567 Share on other sites More sharing options...
mauri_gato Posted May 31, 2006 Author Share Posted May 31, 2006 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. Quote Link to comment https://forums.phpfreaks.com/topic/10841-help-me-please/#findComment-40662 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.