Jump to content

Vizonz

Members
  • Posts

    43
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

Vizonz's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. thanks so much both of you that led to it working
  2. Anyone this is kinda important its set up and running besides the search. The results are in ajax pagination so thats working just the search dont function
  3. thanks for trying tried all of the above and no result
  4. the query works its displaying all the results. but when i use the search box to find a specific thing thats where i get the error
  5. found a little ajax script to display search results so i changed it up a little but when searching getting an error. anyone give me a hand finding out why.. $qry = "SELECT DISTINCT artist,label,genre,composer FROM songlist GROUP BY artist ORDER BY songlist.date_added"; $searchText = ""; if($_REQUEST['search_text']!=""){ $searchText = $_REQUEST['search_text']; $qry .=" where artist like '$searchText%'"; You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'where artist like 'Artist%'' at line 2 if you need more info i will post more but maybe its just a error in that above code didnt know where to post this in ajax mysql or php but it seems more a mysql problem then any of the others
  6. Nevermind figured it out
  7. i am an idiot i know why LOL its a new database name i forgot to change it in the query \ where it had radio. in the query was the localhost database i just removed that and it now works. thanks for the help with the actual php though the rest was my stupidity
  8. <?php include("dbinfo.inc.php"); mysql_connect($host,$username,$password); @mysql_select_db($database) or die( "Unable to select database"); $query = "SELECT DISTINCT requestlist.songID, songlist.ID, requestlist.ID, songlist.artist, songlist.title, songlist.count_requested, songlist.composer, requestlist.status FROM radio.requestlist INNER JOIN radio.songlist ON requestlist.songID = songlist.ID WHERE requestlist.status = 'played' GROUP BY requestlist.status, songlist.title, songlist.artist ORDER BY songlist.count_requested DESC, songlist.artist DESC LIMIT 30; "; $result=mysql_query($query); if ($result = mysql_query($query)) { if (mysql_num_rows($result)) { echo "<ol>\n"; while ($row = mysql_fetch_assoc($result)) { echo "<li> {$row['artist']} - <a href='{$row['songID']}'>{$row['title']}</a> ({$row['count_requested']} ) </li>\n"; } echo "</ol>\n"; } else { // no results found, handle error. } } else { // query failed, handle error. trigger_error(mysql_error()); } ?> theres the code though
  9. sorry wasnt paying attencion its where it was last nothing changed still same thing same error From the server Regarding your issue with database connection, has returned from our investigation. It has been determined that database connection is working properly. We have tested and we were able to access database and run sql query for it (please see connection logs below). Please check code in top30.php. We have now closed the ticket with regards to this issue. If you do require any further assistance, please do not hesitate to contact us and we will be glad continue working with you.
  10. Alright they telling me i have access to the database that something is wrong with the coding anyone help me ?
  11. i like it stupid server tells me we opened a ticket for are tier 3 team and you will get a responce within 48 hours. 48 hours to check a few things in phpmyadmin. aplus hosting great support team LOL
  12. yeah i had to contact them for them to open a ticket to srt permissions on the database LOL dedicated servers so much better . but thanks i will let you know if it works after that by the way love your blog nice design
  13. thats what i thought it had to do with. its a remote server not dedicated and they dont have the user permissions in phpmyadmin is there a query to add privledges or is it something the server has to add
  14. Notice: SELECT command denied to user thats what i get with that now
  15. <?php include("dbinfo.inc.php"); mysql_connect($host,$username,$password); @mysql_select_db($database) or die( "Unable to select database"); $query = "SELECT DISTINCT requestlist.songID, songlist.ID, requestlist.ID, songlist.artist, songlist.title, songlist.count_requested, songlist.composer, requestlist.status FROM radio.requestlist INNER JOIN radio.songlist ON requestlist.songID = songlist.ID WHERE requestlist.status = 'played' GROUP BY requestlist.status, songlist.title, songlist.artist ORDER BY songlist.count_requested DESC, songlist.artist DESC LIMIT 30; "; $result=mysql_query($query); $num=mysql_num_rows($result); if ($result = mysql_query($query)) { if (mysql_num_rows($result)) { echo "<ol>\n"; while ($row = mysql_fetch_assoc($result)) { echo "<li> {$row['artist']} - <a href='{$row['songID']}'>{$row['title']}</a> ({$row['count_requested']} ) </li>\n"; } echo "</ol>\n"; } else { // no results found, handle error. } else { // query failed, handle error. trigger_error(mysql_error()); } ?> and its a parse error Parse error: syntax error, unexpected T_ELSE in on line 34 i took out some of the html above it so yeah // no results found, handle error. } else { line 34 is the else
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.