Hello, how come this code not work?

$qry = mysql_query("SELECT performerid,pic0 FROM ".$table." ORDER BY RAND() LIMIT 6"); 

        $start =  new WP_Query('showposts=6&orderby=rand');

        if ($start->have_posts()) : while( $start->have_posts() ) : $start->the_post();

        $rows = mysql_fetch_assoc($qry);

        if (!$rows) 
           $rows = mysql_fetch_assoc($qry);

        $perfs = $rows['performerid'];

        $pics  = $rows['pic0']; 

I ahve the next error:

Warning: mysql_data_seek(): supplied argument is not a valid MySQL result resource in /home/content/d/d/a/ddxxxx

Your call to mysql_data_seek only happens if $rows is null. If that is true, then your call to mysql_data_seek will definitely fail, because among it's needed args is null. This is exactly why you are obtaining the error message.

The issue is you are passing the incorrect factor to mysql_data_seek(). It's expecting you to definitely pass it $qry (your results object) and never the empty $rows variable you simply examined.