Results 1 to 13 of 13
  1. #1
    Newbie
    Join Date
    December 19th, 2010
    Posts
    14
    Code to show pages from MySQL?
    This most likely is not the right place to ask.... however if I don't want to use Wordpress, I do understand and have uploaded my data feed from CJ and others in my MYSQL data base ready to go... what code do I need in my site to pull the data from my data base to show on my site?

    If you need to send me to another thread, that's fine.

    Thanks
    Last edited by 2busy; December 19th, 2010 at 09:35 AM. Reason: This question was split out from software discussion

  2. #2
    Member
    Join Date
    November 3rd, 2009
    Posts
    50
    you need to code your own script in PHP/asp/any programming language in order to retrieve data straight from the database, and display such data on your website.

    Neither WP would do this if you didn't use some kind of script or plugin to import the datafeed into wordpress.

  3. #3
    Newbie
    Join Date
    December 19th, 2010
    Posts
    14
    Thank you MoreBeer.

    The reason for my post is that I understand the need for coding in both instances. I guess I was assuming that someone would point me toward some general codes out there to get started.

  4. #4
    ABW Ambassador beachcom's Avatar
    Join Date
    May 11th, 2006
    Location
    Myrtle Beach SC
    Posts
    723
    This should get you started.
    Last edited by beachcom; December 19th, 2010 at 11:15 AM.

  5. #5
    Newbie
    Join Date
    December 19th, 2010
    Posts
    14
    Thank you beachcom...

  6. #6
    Full Member
    Join Date
    November 21st, 2010
    Posts
    230
    I must be missing something. I keep seeing people link to that site but I don't see anything beyond step 1 which doesn't really seem to show much at all?

    Anyway, I take it you may not have much experience in way of programming based on the non-specifics of your question. The first step is to identify which platform you'll be developing under (probably either PHP or ASP depending on your circumstances).

    You'll probably best be served by searching amazon.com for a book which can walk you through the process in a proven linear fashion. I know there are quite a few good ones for PHP and MySQL.

    But if you want to piece it together yourself, help with PHP is pretty easy to find with a simple google search.

    how to access mysql through php - Google Search

  7. #7
    Newbie
    Join Date
    December 19th, 2010
    Posts
    14
    Hi bradk,

    The link is for only Step 1 however there are 4 total steps provided at other links for this blog... which are pretty clear on the pages to create and code to start with and reasoning for each.

    In the last step he does provide a base set of files ready to be edited. I will be testing them out by tomorrow.

    I have done most of my internet (building/coding) though the years via finding templates to speed my learning curve. This was just one more of those times for me. It may not be other's cup 'o tea but I'd rather find for free or pay a small fee to get me started than reading a book and doing it trial by error.

    From what I have read in the link provided, it is fairly thorough and perfect for what I need to continue my journey.

    Thanks for the thought.

  8. #8
    Full Member
    Join Date
    November 21st, 2010
    Posts
    230
    oh, i see them now. not very intuitive, but I guess that's just me.

  9. #9
    Member
    Join Date
    November 3rd, 2009
    Posts
    50
    Quote Originally Posted by bradk View Post
    oh, i see them now. not very intuitive, but I guess that's just me.
    It's not just you, the link to the "next post" is placed in the least intuitive spot on the page.

  10. #10
    Yup, Sure ... now let me check ... Cagles Mill's Avatar
    Join Date
    January 18th, 2005
    Location
    The Midwest
    Posts
    646
    I learned all my PHP stuff here: PHP Tutorial (W3Schools.com).
    Last edited by Cagles Mill; December 19th, 2010 at 04:47 PM.
    Rick M.
    I would rather have a bottle in front of me, than have a frontal lobotomy!
    Does your bubblegum lose its flavor on the bedpost overnight?

  11. #11
    ABW Ambassador
    Join Date
    January 18th, 2005
    Location
    Reno, NV
    Posts
    856
    OK. Depending on what you want to do, your typical MySQL query and PHP code can be quite involved. But...here's something very simple that you can start out with.

    First, there is the MySQL query:

    Code:
    <?php 
    	$query = 'SELECT * FROM `MYTABLE`
                    WHERE Category = 'MYPRODUCTS'
    		ORDER BY TITLE Limit 5';
    			
    	$results = mysql_query($query)
    		or die(mysql_error());
    ?>
    This simple query selects all matching fields from the table called MYTABLE where the category is MYPRODUCTS. It will then "order" the results alphabetically by TITLE, and will limit the number of results to 5.

    So what is in "MYTABLE"? Anything you want, but for most affiliates MYTABLE will be a data feed from a merchant or one you created.

    Now, to take that information and put it on a web page:

    Code:
    <?php 
    		while ($row = mysql_fetch_array($results)){
    			extract($row);
    			echo "<a href=$url class='CssStyle1'>$title</a>";
    			echo " : <font class='CssStyle2'>$description</font>";
    			echo "<br>";
    			echo "<br>";
    			echo "<font class='CssStyle3'>$retail_price</font>";
    			}
    ?>
    $title = Name/Title of Product
    $description = Description of the product from the datafeed
    $retail_price = Price of product

    "echo" is the statement that is used to "print something" to the web page.

    $title, $description, $retail_price are all fields from the datafeed, in this example.

    Hope this gets you started.

  12. #12
    ABW Ambassador writerguy's Avatar
    Join Date
    January 17th, 2005
    Location
    Springfield, Missouri, USA
    Posts
    3,248
    Quote Originally Posted by bradk View Post
    I must be missing something. I keep seeing people link to that site but I don't see anything beyond step 1 which doesn't really seem to show much at all?
    Been awhile since I've looked into that link much, but I believe if you look further down, below the post and the post comments, you'll see links to steps 1B, 2, and 3 -- and in those posts he even has downloadable zip files with the scripts he's creating.
    Generate more fake news.

  13. #13
    Newbie
    Join Date
    December 19th, 2010
    Posts
    14
    Thanks to all for the information. I have read through each of the post/steps and additional posts by the author Eric Nagel. I have communicated several times with him as well. He is very pleasent and obviously knows his stuff, however... the tutorial listed is created to work only for Share A Sale, there is a different script required if someone wants to access Commission Junction and also more programming if LinkShare or others are wanted.

    Because I am not a coder and the author does not have time to take me any further than what he has posted... I still have not gotten his files or guidance to work for me so far. Most likely I have one small thing missing in the code that is expected by the author for a coder to already know.

    I can take the download and upload it into my SQL data base, I just don't have what it takes to code the webpage to retrieve and display the products.

    I would be very interested in finding a coder who has made this work who would build a base set of files that do work for me. If they want to use what Eric has set in motion, I don't care. I am just looking for a template or templates that will allow me to download the data feeds from several of the affiliate groups such as CJ, SAS, Amazon, LinkShare, Google, etc... without having to use GoldenCAN or Datafeedr, etc...

    I may find that my desire is fruitless, but I want to give it a try. I hope this makes sense.

  14. Newsletter Signup

+ Reply to Thread

Similar Threads

  1. Create Product Pages w PHP/MYSQL
    By Cheesehead in forum Programming / Datafeeds / Tools
    Replies: 6
    Last Post: December 14th, 2008, 08:45 AM
  2. Do Google CPM Ads Show Up On All Pages - Or Just
    By MoneyBusiness in forum Search Engine Optimization
    Replies: 15
    Last Post: October 13th, 2007, 02:47 PM
  3. Which Allposters pages show ae products?
    By TJ in forum Cusimano.com Scripts
    Replies: 3
    Last Post: September 5th, 2005, 10:29 PM
  4. Which pages does Google show?
    By icicle in forum Search Engine Optimization
    Replies: 49
    Last Post: January 5th, 2002, 02:25 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •