SQL error Warning: mysql_result() Unable to jump to row 0 on MySQL

Discussion in 'Server Operation' started by planet_fox, Aug 19, 2008.

  1. planet_fox

    planet_fox Member HowtoForge Supporter

    I have this error message in a site

    Code:
    Warning: mysql_result() [function.mysql-result]: Unable to jump to row 0 on MySQL result index 52 in /www/php/php_files/details.php on line 23
    This is line 23

    Code:
    AND m.main_nr = "'.mysql_result($result, 0, 'm.main_nr').'"
    I have test it run with a backup of sql files, and have the error. on Mai was no problem in this site, i have server not cahnge only updates do of mysql5 and php5.

    The complete area of this line of 23 is

    Code:
     $sql = 'SELECT z.name
                    FROM sys_main m, sys_link l, sys_zusatz z, sys_kat k
                    WHERE m.main_nr = l.main_nr
                    AND l.zusatz_nr = z.zusatz_nr
                    AND z.kat_nr = k.kat_nr
                    AND m.main_nr = "'.mysql_result($result, 0, 'm.main_nr').'"
                    AND k.name = "Modell"';
            $resultmodell = mysql_query($sql);
    PHP Error Messages compl.
    Code:
    #	Time	Memory	Function	Location
    1	0.0013	130944	{main}( )	../index.php:0
    2	0.1063	5210940	require_once( '/www/php/components/com_content/content.php' )	../index.php:236
    3	0.1159	5715824	JCache_Lite_Function->call( )	../content.php:53
    4	0.1160	5715824	call_user_func_array ( )	../joomla.cache.php:58
    5	0.1160	5715824	Cache_Lite_Function->call( )	../joomla.cache.php:0
    6	0.1161	5759504	call_user_func_array ( )	../Function.php:100
    7	0.1161	5760024	showItem( )	../Function.php:0
    8	0.1304	5797676	show( )	../content.php:1531
    9	0.1314	5797956	JCache_Lite_Function->call( )	../content.php:1731
    10	0.1314	5797956	call_user_func_array ( )	../joomla.cache.php:58
    11	0.1314	5797956	Cache_Lite_Function->call( )	../joomla.cache.php:0
    12	0.1315	5842320	call_user_func_array ( )	../Function.php:92
    13	0.1315	5842364	HTML_content::show( )	../Function.php:0
    14	0.1396	6130720	mosMambotHandler->trigger( )	../content.html.php:461
    15	0.1397	6131596	call_user_func_array ( )	../joomla.php:4350
    16	0.1397	6131656	botAddPhp( )	../joomla.php:0
    17	0.1406	6222688	include( '/www/php/php_files/details.php' )	../rd_addphp.php:56
    18	0.1410	6223680	mysql_result ( )	../details.php:32
     
    Last edited: Aug 19, 2008
  2. falko

    falko Super Moderator Howtoforge Staff

    I guess that something's wrong with the part in red:

    AND m.main_nr = "'.mysql_result($result, 0, 'm.main_nr').'"

    Maybe an empty result?
     
  3. planet_fox

    planet_fox Member HowtoForge Supporter

    Thanks Falco

    is m.main_nr a table
     
  4. falko

    falko Super Moderator Howtoforge Staff

    The table is called m, and m.main_nr refers to the column main_nr in the table m.
     

Share This Page