database - WordPress Custom Table Loop not quite right -


I have this code on a WordPress site on a custom site page:

  Code: & lt; H1 & gt; 2009 Author List & lt; / H1> & Lt; H3 & gt; To read more about them, click on each author & lt; / H3 & gt; & Lt; P & gt; & Nbsp; & Lt; / P & gt; & Lt; Hour align = "left" width = "75%" & gt; View Categories: & lt; P & gt; & Lt; A href = "# childrens" & gt; Children & lt; / A & gt; | & Lt; A href = "#close" & gt; Fiction & lt; / A & gt; | & Lt; A href = "#non-imagination" & gt; Non-fiction & lt; / A & gt; | & Lt; A href = "# Teenager" & gt; Teenager & lt; / A & gt; | & Lt; A href = "# other" & gt; Other & lt; / A & gt; & Lt; / P & gt; & Lt; P & gt; & Nbsp; & Lt; / P & gt; & Lt ;? Php $ result = $ wpdb-> Get_results ('select author_sub9.Sid, author_sub9.author_lname, author_sub9.author_fname, author_sub9.title, author_sub9.genre, author_sub9. Author_sub9 has been accepted WHERE author_sub9.approved = 1 by ORDER author_sub9 .genre, author_sub9.author_lname' , ARRAY_A); $ SLastGenre = ''; If ($ result) {foreach ($ $ result as line $) if ($ line ['style']! = $ SLastGenre) {if ($ sLastGenre! = '') Echo ' 

Have you invested $ wpdb Added?

  global $ wpdb; $ Wpdb- & gt; get_result ($ sql, ARRAY_A);  

Comments

Popular posts from this blog

sql - dynamically varied number of conditions in the 'where' statement using LINQ -

asp.net mvc - Dynamically Generated Ajax.BeginForm -

Debug on symbian -