The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums Back End [Solved] Conditional mysql query statement

  • This topic is empty.
Viewing 1 post (of 1 total)
  • Author
  • #30077

    Hey guys, I’m making a simple photography portfolio which pulls all of the information of each picture from a database and each time the pictures shows up, it loads my file which has all of the mysql information and queries.

    How can I have a conditional statement like:

    if($query == 'home'){
    $q = "SELECT * FROM images ORDER BY id ASC LIMIT 10";

    But this is the error I get:
    [28-Aug-2010 03:55:18] PHP Warning: mysql_fetch_array() expects parameter 1 to be resource, boolean given in C:xampphtdocsphotographydata.php on line 35

    Any help would be much appreciated.

Viewing 1 post (of 1 total)
  • The forum ‘Back End’ is closed to new topics and replies.