deafboyzaudio 0 Newbie Poster

Hey everyone,

Wanted to say hi, greetings to everyone!!!

I was hoping that I could get some help here as my efforts to get help elsewhere have been futile....

I found a good pagination tut at this link: http://www.dynamicdrive.com/dynamicindex17/ajaxpaginate/index.htm that im using with PHP and a MYSQL database.

I can get it to work with the demo items provided but as soon as I try to put my own MYSQL code in the spot where he does in his example on page 2, everything gets all messed up and wont work.

here is the code that i want to generate the entries for the pagination script:

// prepare SQL to retrieve subset of image details
$query1 = "SELECT * FROM video WHERE video_username = '$username' ORDER BY video_upload_date DESC LIMIT 7";
		mysql_select_db($database_db294582132, $db294582132);
  		$result1 = mysql_query($query1, $db294582132) or die(mysql_error());
// extract the first record as an array 

	while($row1 = mysql_fetch_assoc($result1)){
  		$video_id      = $row1['video_id'];
		$thumb         = $row1['video_t_filename'];
		$video_title   = $row1['video_title'];
  		$song_name     = $row1['video_song_name'];
  		$song_artist   = $row1['video_song_artist'];
  		$song_unknown  = $row1['video_song_unknown'];
		$caption       = $row1['video_caption'];
		$vehicle_id    = $row1['vehicle_id'];
		$video_setup   = $row1['setup_id'];
		$upload_date   = date("m.d.'y, g:i a", strtotime($row1['video_upload_date']));
//get vehicle info
		if($vehicle_id ==!NULL){
			$query2 = "SELECT * FROM user_vehicles WHERE vehicle_id = '$vehicle_id'";
			mysql_select_db($database_db294582132, $db294582132);
  			$result2 = mysql_query($query2, $db294582132) or die(mysql_error());
			$row2    = mysql_fetch_assoc($result2);
			$year        = $row2['vehicle_year'];
			$make        = $row2['vehicle_make'];
			$model       = $row2['vehicle_model'];
		}
		if($setup_id ==!NULL){
//Get setup info	
			$query4 = "SELECT * FROM vehicle_setups WHERE setup_id = '$video_setup'"; 
	 		mysql_select_db($database_db294582132, $db294582132);
  	 		$result4 = mysql_query($query4, $db294582132) or die(mysql_error());
	 		$row4 = mysql_fetch_assoc($result4);
	 		$setup = $row4['setup'];
		}
//provide format for uploaded videos section
 		echo 
 		'<div id="shopVidsDiv"><div id="editButtonDiv"><a href="editVideos.php">edit</a></div>
<div id="vehicleDescriptionDiv"><div id="title"><span class="videoStatHeading">TITLE: </span>',$video_title,'</div><div id="Caption"><span class="videoStatHeading">CAPTION: </span>
',$caption,'</div>
    <div id="song"><span class="videoStatHeading">SONG NAME: </span>',$song_name,'<span class="videoStatHeading"> ARTIST: </span>',$song_artist,'</div><div id="vehicle"><span class="videoStatHeading">VEHICLE: </span>',$year,' ',$make,' ',$model,'</div><div id="setup"><span class="videoStatHeading">SETUP: </span>',$setup,'</div><div id="uploadDate"><span class="videoStatHeading">UPLOADED ON: </span>',$upload_date,'</div></div>
<img src="images/videoThumbs/',$thumb,'.jpg" width="100" height="75" alt="',$caption,'" />
</div>';
	}

I know it might not be that pretty but this is my first site EVER that I have built and I am learning

With that in mind i would love it if someone could give me a clearer example of how to integrate the 2?

even just a general guide thats easier to understand.....? I should be able to get the rest... hopefully.....thanks!!!