Hello guys, Can someone please give me a little help here please? After I upgrade my php version from 5.3 to 5.5 many errors has appeared in my sites. For example: Line 769 code: <h3> <a href="http://domain.com/page"><span>Name List</span></a> </h3> <ul> <?php global $wpdb; $postTab = $wpdb->prefix."posts"; $postMeta = $wpdb->prefix."postmeta"; global $post; ?> <?php query_posts( 'post_type=model&portfolio_cat&Featured&orderby=title&order=ASC&paged=' . $paged); while ( have_posts() ) : the_post(); $mrpostParent =$post->ID; $ttFGQue =mysql_query("select * from $postTab as a,$postMeta as b where a.ID=b.post_id and a.post_type='freegallery' and a.post_status='publish' and ( b.meta_key='mr_freeGalleryModel' or b.meta_key='mr_freeGalleryModel_2') and b.meta_value='$mrpostParent'"); if($ttFGQue && mysql_num_rows($ttFGQue)>0) { $totalFg = mysql_num_rows($ttFGQue); } else{ $totalFg="0"; } ?> <li> <a href="<?php the_permalink(); ?>"><?php the_title() ?> (<?php echo $totalFg; ?>)</a> </li> <?php endwhile; ?> </ul> PHP: Line 97 code: $ttFVQue =mysql_query("select * from $postTab where post_type='freevideo' and post_status='publish' and post_parent='$mrpostParent'"); PHP: Line 95 code: $ttFVQue =mysql_query("select * from $postTab as a,$postMeta as b where a.ID=b.post_id and a.post_type='freevideo' and a.post_status='publish' and ( b.meta_key='mr_freeV_model' or b.meta_key='mr_freeV_model2') and b.meta_value='$mrpostParent'"); PHP: I really appreciate it if someone can help me Thank you!!
Check your mysql_connect settings. Currently you're trying to connect to the database without a username
Also to add, the original mysql functions are deprecated. If you have the ability to, switching to another database method like mysqli or PDO is a good idea, and likely safer.