Jump to content

phphelp!

New Members
  • Posts

    8
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

phphelp!'s Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. Thank you a lot: it gave me SELECT * FROM 2010_image where collectionID=1 ORDER BY orderIndex desc
  2. Hello, I need some help modifying some code. I would like to change the layout to show more then currently offered. As of now I have a layout that shows either 3 or 10 images. I tried to change the numbers, but no luck and I can not seem to be able to change to view more. Any help would be great! // image list $mysqlDataImage = mysql_query( "SELECT * FROM $DB_IMAGE where collectionID=$cat $where ORDER BY $order_by" ); $dataLength = mysql_num_rows( $mysqlDataImage ); $totalImages = $dataLength; //$cat_scrollview = 3; //FORCE SCROLLER if($scrollview == "smaller"){ $cat_scrollview = 0; } //User Override //SWITCH SCROLL LAYOUT BASED ON VIEW : HANDLES COLUMNS, ROWS, PAGES AND SHOW ALL if (($cat_scrollview == 3)||($scrollview == "bigger")){ $PAGE_SIZE = 3; //how many pics per page, all set in html $rowDefault = 1; //row default-changes the most $colDefault = $totalImages/ 1; //columns default use to breakup columns //echo "cols=".$colDefault; //echo "totalimage=".$totalImages; //See getNumberOfRows() $totalPages = $totalImages/$PAGE_SIZE; $cat_scrollview = 3; $scrollview = "bigger"; }else{ $PAGE_SIZE = 10; //how many pics per page, all set in html $rowDefault = 2; //row default-changes the most $colDefault = $totalImages/ 2; //columns default use to breakup columns //echo "cols=".$colDefault; //echo "totalimage=".$totalImages; //See getNumberOfRows() $totalPages = $totalImages/$PAGE_SIZE; $cat_scrollview = 0; $scrollview = "smaller"; } I am new to PHP so please be kind (and explain slowly) Thank you!
  3. I am trying to create a page based off an already existing page developed by someone else. My question is, could I take a database copy it exacted only changing the names of the databases in mysql, and in the code copy it and every where the first database is referenced change it to the second? I tried that and I have been getting errors. Is this not possible? Any help would be greatly appreciated. Thank you
  4. Hello, I was wondering if it looks correct, or really what should be changed. Is my variable defined incorrectly? Any help or guidance would be wonderful. Thank you all
  5. Hey Thank you much wildteen88 I believe that where the variable defined is: if($pubID=="" && $issueID=="" || $task == "showall"){ $task="showall"; showAll(); } if($task=="" && $issueID){ fetchIssueItem(); fetchPages($issueID); } if($task=="fetchissues"){ fetchPubItem(); } if($task=="detail"){ fetchIssueItem(); fetchPages($issueID); } function displayListPubMenu(){ global $PATHTO_IMAGES, $DB_ONLINEPUB; $mysqlDataListPub = mysql_query( "SELECT * FROM $DB_ONLINEPUB WHERE `publish` = '1' ORDER BY `name` ASC"); //SELECT * FROM $DB_WALLPAPER where id!=$id ORDER BY $order_by" ); $dataLengthPub = mysql_num_rows($mysqlDataListPub); $s=''; for ($i=0; $i< $dataLengthPub; $i++ ) { $online_pubID = mysql_result( $mysqlDataListPub, $i, pubID ); $online_name = mysql_result( $mysqlDataListPub, $i, name ); $online_orderID = mysql_result( $mysqlDataListPub, $i, orderID ); $s.= '<li><a href="online.php?task=fetchissues&pubID='.$online_pubID.'" target="_self">'. $online_name . '</a></li>'; } return $s;
  6. I then get a message of: 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 `publish` = '1' ORDER BY `name` ASC' at line 1 QUERY: SELECT * FROM WHERE `publish` = '1' ORDER BY `name` ASC
  7. thank you Schilly, Like I said I am very new to this. I am guessing that you want the message after I replaced the code. it is: 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 `publish` = '1' ORDER BY `name` ASC' at line 1
  8. Hello, I am very new to php so please bare with me. I am getting an error of: "Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource in /usr/home/www.xxx.com/xxx/xxx/online.php on line 176" The code is: $content.= $s; } } function showAll(){ global $PATHTO_IMAGES, $DB_ONLINEPUB, $content; $mysqlDataAllPub = mysql_query( "SELECT * FROM $DB_ONLINEPUB WHERE `publish` = '1' ORDER BY `name` ASC"); $dataLengthAllPub = mysql_num_rows($mysqlDataAllPub); //echo "HELLO DATALENGTH=" .$dataLengthAllPub; $count = 0; $s=''; for ($i=0; $i< $dataLengthAllPub; $i++ ) { $online_pubID = mysql_result( $mysqlDataAllPub , $i, pubID ); $online_name = mysql_result( $mysqlDataAllPub , $i, name ); $online_orderID = mysql_result( $mysqlDataAllPub , $i, orderID ); $s.= '<li > <div id="showallmod"> <div class="con">' .showAllIssues($online_pubID). '</div> </div> </li>'; } $content= $s; } I'm not sure even where to begin troubleshooting this. I thank you in advance for your help
×
×
  • 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.