jeva39 Posted September 9, 2006 Share Posted September 9, 2006 I understand that In order to have MySql 5.0 functions available in PHP, I must compile PHP with support for the mysqli extension. Please, how I can do this? I use PHP 4.3Thanks! Quote Link to comment Share on other sites More sharing options...
redarrow Posted September 9, 2006 Share Posted September 9, 2006 there is no diffrence with mysql and old mysql as a install setup read the mysql manual on there site.good luck. Quote Link to comment Share on other sites More sharing options...
jeva39 Posted September 9, 2006 Author Share Posted September 9, 2006 The real problem is that all mysql functions don't work in PHP and phpMyAdmin neither work (and the configuration is OK!). Quote Link to comment Share on other sites More sharing options...
redarrow Posted September 9, 2006 Share Posted September 9, 2006 i dont mean to be rude bu you dont need such a high database version use a version that does work with you operating system then ok. Quote Link to comment Share on other sites More sharing options...
wildteen88 Posted September 9, 2006 Share Posted September 9, 2006 If mysql functions are not working then the mysql extension hasnt been loaded correctly.Create a new php file called it info.php. now add the following code to the file:[code=php:0]<?phpphpinfo();?>[/code]Upload to your website, now goto mysite.com/info.phpScroll down the page, do you see a MySQL section at all. To find the MySQL section when running the phpinfo function search for [b]mysql Support[/b] or [b]mysqlI Support[/b]. If you find a section and its the mysqli section you'll need to use the mysql[b]i[/b] functions and not the standard mysql functions, or use the mysql functions if its the standard mysql extension thats enabled. if you find nothing then the mysql extension has been enabled. Quote Link to comment Share on other sites More sharing options...
jeva39 Posted September 9, 2006 Author Share Posted September 9, 2006 Thanks wildteen88 for your help. I use NuSphere Editor for see the [b]phpinfo.php [/b] without need to upload the file and I found this. (I understand according to your post that [b]mysql [/b] functions are enabled, right?) mysqlMySQL Support enabled Active Persistent Links 0 Active Links 0 Client API version 3.23.49 Directive Local Value Master Value mysql.allow_persistent On On mysql.connect_timeout 60 60 mysql.default_host no value no value mysql.default_password no value no value mysql.default_port no value no value mysql.default_socket no value no value mysql.default_user no value no value mysql.max_links Unlimited Unlimited mysql.max_persistent Unlimited Unlimited mysql.trace_mode Off Off The code I use for try an example is this: (Really I'm absolutely new to PHP. Allways I work with ASP/ASP.NET)[code]......more code.....<?php $con = mysql_connect("localhost", "root", "doremi");mysql_select_db("jv");$sql = "select id,tema,ritmo, archivo,fecha from temas order by tema";$queryexe = mysql_query($sql); print($queryexe);while(mysql_fetch_row($queryexe)) { $id = mysql_result($queryexe, 1); //Puede ser $id= odbc_result($queryexe, "id"); $tema = mysql_result($queryexe, 2); $ritmo = mysql_result($queryexe, 3); $archivo = mysql_result($queryexe, 4); $fecha = mysql_result($queryexe, 5);?> <tr> <td class="listas" bgcolor="#f7efde"> <?php print ("$tema"); ?></td> <td class="listas" bgcolor="#f7efde"> <?php print ("$ritmo"); ?></td> <td class="listas" bgcolor="#f7efde"> <?php print ("$archivo"); ?></td> <td class="listas" bgcolor="#f7efde"> <?php print ("$fecha"); ?></td> </tr><?php }?>........more code.......[/code]This code don't send any error but don't process nothing! Thanks again for your time.... Quote Link to comment Share on other sites More sharing options...
wildteen88 Posted September 9, 2006 Share Posted September 9, 2006 The mysql extension is enabled then as you can see the mysql section when you run the phpinfo function.The only problems i see with your code is this:[code]while(mysql_fetch_row($queryexe)) { $id = mysql_result($queryexe, 1); //Puede ser $id= odbc_result($queryexe, "id"); $tema = mysql_result($queryexe, 2); $ritmo = mysql_result($queryexe, 3); $archivo = mysql_result($queryexe, 4); $fecha = mysql_result($queryexe, 5);?> <tr> <td class="listas" bgcolor="#f7efde"> <?php print ("$tema"); ?></td> <td class="listas" bgcolor="#f7efde"> <?php print ("$ritmo"); ?></td> <td class="listas" bgcolor="#f7efde"> <?php print ("$archivo"); ?></td> <td class="listas" bgcolor="#f7efde"> <?php print ("$fecha"); ?></td> </tr><?php }?>[/code]Change the highlighted code above to this:[code=php:0]while($row = mysql_fetch_row($queryexe)){?> <tr> <td class="listas" bgcolor="#f7efde"><?php print $row['tema']; ?></td> <td class="listas" bgcolor="#f7efde"><?php print $row['ritmo']; ?></td> <td class="listas" bgcolor="#f7efde"><?php print $row['archivo']; ?></td> <td class="listas" bgcolor="#f7efde"><?php print $row['$fecha']; ?></td> </tr><?php}?>[/code]Do you get anything now? Quote Link to comment Share on other sites More sharing options...
jeva39 Posted September 9, 2006 Author Share Posted September 9, 2006 Thanks but unfortunately don't work. If, with the same code (changing the "Connect" tag to ODBC format), I change the [b]mySql functions [/b] by [b]odbc functions [/b] work. Otherwise, no. I do not know what happens. In my Web Server neither work but by another reason: I don't know how or what privileges I need to manage mySql and although I send the ticket to consult the problem, not yet have responded to me. Quote Link to comment 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.