Jump to content

tdd1984

Members
  • Posts

    10
  • Joined

  • Last visited

    Never

Contact Methods

  • AIM
    tdd1984
  • MSN
    tylerd01@hotmail.com
  • Yahoo
    tdd1984

Profile Information

  • Gender
    Male
  • Location
    anderson, IN

tdd1984's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. Any one know if there is any modules or premade scripts that will meet what I'm trying to do below, its a anituque market place * Sellers can post a station listing and enter their listing specifications using 10-15 data entry fields (i.e. year, make, model , etc), they can upload a picture of their station (Virtual tour if possible?) * Individual sellers charged per listing through Paypal – charge to reoccur monthly until they email notification that the site has sold or they want to discontinue their listing * Brokers charged a monthly fee through Paypal – charge to reoccur monthly (unlimited listings) * Paypal process should be “invisible” and not require customers to establish a Paypal account to complete transactions * Buyers can search the site free of charge – will have ability to search using specific criteria (i.e. year, make, model? Etc) * Link site to sites that car buyers search (i.e. cars.com) * Ability to email out the website info to email addresses gathered thru a database * Optional service for buyers where they can setup to be notified via email when new postings are listed in their geographic area * Sellers and buyers can communicate via their posted contact information * Ability to add paid advertisers to the site to generate additional revenues (i.e. Coca Cola) * As the website operator, I will be able to collect a database of all of the visitors to the website – sellers & buyers * Website to be linked to various industry sites * Model Sites: loopnet.com, realtor.com, cars.com, gablesportscars.com * “ADDITIONAL SERVICES TAB” to be accessible which will present the following ancillary services we can provide
  2. bump no I heard flash cards would help, and I know some people made some up on the internet, but I figured that might get me prepped for the test using other peoples flash cards.
  3. I was studing for my php certification, and I didn't know if any one had any great flash cards available I could use, that will be on the test, or could tell me exaclty what I need to study, you can reach me at tdd1984@yahoo.com 765-274-6877 yahoo: tdd1984@yahoo.com aim:tdd1984
  4. Could someone help me for some reason I'm getting duplicat results on my sql query my query was working fine until i added a second one cause i was using a pagination. My 1st query was working fine until i went and added the second query i can be contact here, or e-mail tdd1984@yahoo.com, AOL: tdd1984, or yahoo tdd1984, or msn tylerd01@hotmail.com <?php mysql_select_db("tdd1984") or die("Problem selecting database"); $type = urlencode ($_GET['type']); $limit = 25; $sql = "SELECT COUNT(*) FROM (items JOIN user ON items.userId=user.ID) LEFT JOIN images ON items.itemId=images.idNum "; if (isset($_GET['type'])) { $sql .= " WHERE type='". urlencode($_GET['type'])."'"; } $result_count = mysql_query($sql) or die ("MySQL Error: ".mysql_error()); $numofrows = mysql_fetch_array ($result_count); if(empty($page)) {    // Checks if the $page variable is empty (not set)     $page = 1;      // If it is empty, we're on page 1     }     $limitvalue = ($page - 1) * $limit;     // Ex: (2 * 25) - 25 = 25 <- data starts at 25 $sql1 = "SELECT itemId, userId, description, date, city, county, idNum, name, price, type FROM (items JOIN user ON items.userId=user.ID) LEFT JOIN images ON items.itemId=images.idNum"; if (isset($_GET['type'])) { $sql1 .= " WHERE type='". urlencode($_GET['type'])."'"; } $sql1 .= "limit $limitvalue, $limit"; $result = mysql_query($sql1) or die("Error: " . mysql_error()); if(mysql_num_rows($result) == 0) {     echo("Nothing to Display!");     } echo "<TABLE width=\"25px\">\n"; echo "<TR><TD colspan=\"2\"><img src=\"http://indianaclassifiedads.com/description.jpg\"></TD><TD><img src=\"http://indianaclassifiedads.com/price.jpg\"></TD><TD><img src=\"http://indianaclassifiedads.com/datesubmitted.jpg\"><td><img src=\"http://indianaclassifiedads.com/city.jpg\"></td><TD><img src=\"http://indianaclassifiedads.com/county.jpg\"></td></TD></TR>\n"; while($row = mysql_fetch_array($result)) { for($i = 0; $i < $result; $i++) { if($i % 2) { echo "<TR bgcolor=\"#FFFFCC\">\n"; } else { echo "<TR bgcolor=\"white\">\n"; } if($row['idNum'] == null) { echo "<td class=\"result-cell-border\">&nbsp</td>"; } else { echo "<td><img src=\"http://indianaclassifiedads.com/pic.gif\"></td>"; } echo "</td>"; echo "<td align=\"left\" class=\"result-cell-border\"> <span class=\"result-title\"> <a href=\"contact.php?type-id=".$row['itemId']."&userid=".$row['userId']. "\ class=\"result-title\"\">".$row['name']."</a> </span> <br />".$row['description']."</a></td> <td align=\"center\" class=\"result-cell-border\">$".$row['price']."</TD> <TD align=\"center\" class=\"result-cell-border\">".$row['date']."</td> <td align=\"center\" class=\"result-cell-border\">".$row['city']."</td> <td align=\"center\" class=\"result-cell-border\">".$row['county']."</TD>\n"; echo "</TR>\n"; } } echo "</TABLE>\n"; //pagination next button if($page != 1) {     $pageprev = $page--;         // Fancy way of subtracting 1 from $page echo("<a href=\"$PHP_SELF&page=$pageprev\">PREV".$limit."</a> ");     } else     echo("PREV".$limit." ");         // If we're on page 1, PREV is not a link $numofpages = $numofrows / $limit;     /* We divide our total amount of rows (for example 102) by the limit (25). This will yield 4.08, which we can round down to 4. In the next few lines, we'll create 4 pages, and then check to see if we have extra rows remaining for a 5th page. */     for($i = 1; $i <= $numofpages; $i++) {     /* This for loop will add 1 to $i at the end of each pass until $i is greater than $numofpages (4.08). */ if($i == $page) {     echo($i." ");     } else {     echo("<a href=\"$PHP_SELF&page=$i\">$i</a> ");         } }         /* This if statement will not make the current page number available in link form. It will, however, make all other pages available in link form. */       // This ends the for loop if(($numofrows % $limit) != 0) {     /* The above statement is the key to knowing if there are remainders, and it's all because of the %. In PHP, C++, and other languages, the % is known as a Modulus. It returns the remainder after dividing two numbers. If there is no remainder, it returns zero. In our example, it will return 0.8 */         if($i == $page) {         echo($i." ");         } else {         echo("<a href=\"$PHP_SELF&page=$i\">$i</a> ");         }         /* This is the exact statement that turns pages into link form that is used above */     }  // Ends the if statement     if(($numofrows - ($limit * $page)) > 0) {     /* This statement checks to see if there are more rows remaining, meaning there are pages in front of the current one. */     $pagenext = $page++;         // Fancy way of adding 1 to page     echo("<a href=\"$PHP_SELF?type=$type&page=$pagenext\">NEXT".$limit."</a>");         /* Since there are pages remaining, this outputs NEXT in link form. */     } else {     echo("NEXT".$limit);         /* If we're on the last page possible, NEXT will NOT be displayed in link form. */     } ?> </body> </html>
×
×
  • 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.