Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

photo gallery for oscommerce


Recommended Posts

Thanks Matt for your help.

 

I didn't use any special characters in my title that I can recall. I change line 7 as per your instructions and this is the error message now.

 

Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in /home/smmpztm/public_html/xxxxxxxxx/gallery_process.php on line 7

Unknown column 'gallery_user.php' in 'where clause'

Link to comment
Share on other sites

  • Replies 320
  • Created
  • Last Reply

Top Posters In This Topic

Thanks Matt for your help.

 

I didn't use any special characters in my title that I can recall. I change line 7 as per your instructions and this is the error message now.

 

Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in /home/smmpztm/public_html/xxxxxxxxx/gallery_process.php on line 7

Unknown column 'gallery_user.php' in 'where clause'

 

This error says that in line 7, the SQL statement mentions a colum called 'gallery_user.php' in the WHERE part. If you have copied the line i mentioned to replace in the earlier post, then this is impossible.

 

Line 7 should read:

$sql = mysql_fetch_array(mysql_query("SELECT title, description FROM gallery WHERE cID=".$_GET['cID']." AND pID=".$_GET['pID'])) or die(mysql_error());

 

Whereas, following the error you provide, your line 7 reads something like:

$sql = mysql_fetch_array(mysql_query("SELECT title, description FROM gallery WHERE 'gallery_user.php'=".$_GET['cID']." AND pID=".$_GET['pID'])) or die(mysql_error());

 

Please paste your entire gallery_process.php content here.

Matthias Thoen

my contribution: Photo Gallery for osCommerce

--check my homepage in my CARD--

Link to comment
Share on other sites

Oh I may well have edited the wrong gallery file :blush: Sorry!!

 

I uploaded a fresh copy and tried again, similar error. I drop the table and tried again, similar error.

 

Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in /home/smmpztm/public_html/ribbonrie/gallery_process.php on line 7
Unknown column 'gallery_user.php' in 'where clause'

 

 

Here the entire code from my gallery_process.php

<?php
 require('includes/application_top.php');
 require(DIR_WS_LANGUAGES . $language . '/gallery_user.php');


if (isset($_GET['edit']) && $_GET['edit']=='yes') {
$sql = mysql_fetch_array(mysql_query("SELECT title, description FROM gallery WHERE cID=".$_GET['cID']." AND pID=".$_GET['pID'])) or die(mysql_error());
if ($sql['title']=='') {
	$titel = SET_TITLE;
} else {
	$titel = $sql['title'];
}
if ($sql['description']=='') {
	$desc = SET_DESCRIPTION;
} else {
	$desc = $sql['description'];
}
?>
<form name="form" action="gallery_user.php" method="post" target="_parent">
<input type="text" name="title" value="<?php echo $titel;?>" onClick="this.select()">
<input type="hidden" name="cID" value="<?php echo $_GET['cID'];?>">
<input type="hidden" name="pID" value="<?php echo $_GET['pID'];?>">
<textarea name="description" onClick="this.select()"><?php echo $desc;?></textarea>
<input type="submit" value="save" name="edittitle">
</form>

<?php
} else {
$naam = $_POST['comment_naam'];
$tekst = $_POST['comment_tekst'];
$cID =$_POST['cID'];
$pID = $_POST['pID'];
//echo $naam." ///".$tekst." ".$cID." ///".$pID;

$bestaande_comment = mysql_fetch_array(mysql_query("SELECT comment FROM gallery WHERE cID=".$cID." AND pID=".$pID));

if ($bestaande_comment['comment'] != '') {$spacer='<-->';}

$nieuw_comment = $bestaande_comment['comment'].$spacer.$naam."///".$tekst;

mysql_query("UPDATE gallery SET comment='".$nieuw_comment."' WHERE cID=".$cID." AND pID=".$pID);

header("Location: gallery.php?autoload=".$cID.$pID);
}
?>

Link to comment
Share on other sites

Oh I may well have edited the wrong gallery file :blush: Sorry!!

 

I uploaded a fresh copy and tried again, similar error. I drop the table and tried again, similar error.

 

Here the entire code from my gallery_process.php

There seems nothing wrong with this. The error simply does not make sense. The only thing i can think of is that you are using quotes in your title and/or description. To solve this you need to apply the temporary bugfix from post#75

Matthias Thoen

my contribution: Photo Gallery for osCommerce

--check my homepage in my CARD--

Link to comment
Share on other sites

Hi Matt

 

I shall complete the bug fix and try again although I assure you the title and description was very general (about a greetings card LOL) We shall see eh?

 

Cheers

Heather

Link to comment
Share on other sites

Sorry, I wish it was a smoother ride :blush: Completed the edits, did them twice as I get this error

Parse error: syntax error, unexpected T_ELSE in /home/smmpztm/public_html/xxxxxxxxx/gallery.php on line 180

 

Sooooo wish I knew how to fix these errors myself, I just don't understand enough as yet <_<

<?php
/*
Photo Gallery for osCommerce version 0.5


 $Id: shipping.php,v 1.22 2003/06/05 23:26:23 hpdl Exp $

 osCommerce, Open Source E-Commerce Solutions
 [url="http://www.oscommerce.com"]http://www.oscommerce.com[/url]

 Copyright © 2003 osCommerce  Released under the GNU General Public License

Site design by www.micrographx.be
*/

 require('includes/application_top.php');

 require(DIR_WS_LANGUAGES . $language . '/gallery.php');

 $breadcrumb->add(NAVBAR_TITLE, tep_href_link('gallery.php'));
?>
<!doctype html public "-//W3C//DTD HTML 4.01 Transitional//EN">
<html <?php echo HTML_PARAMS; ?>>
<head>
<script type="text/javascript" src="highslide/highslide.js"></script>

<script type="text/javascript">   

<?php if (isset($_GET['autoload'])) {?>
hs.addEventListener(window, "load", function() { 
  // click the element virtually: 
  document.getElementById("autoload<?php echo $_GET['autoload'];?>").onclick(); 
}); 
<?php } ?>
hs.registerOverlay({
overlayId: 'closebutton',
position: 'top right',
fade: 2 // fading the semi-transparent overlay looks bad in IE
});

hs.graphicsDir = 'highslide/graphics/';
//hs.padToMinWidth = true;
//hs.minWidth = 400;
</script>

<style type="text/css">
.highslide-wrapper div { font-family: Verdana, Helvetica;}
.highslide {cursor: url(highslide/graphics/zoomin.cur), pointer;outline: none;text-decoration: none;}
.highslide-active-anchor img {visibility: hidden;}
.highslide img {/*border: 2px solid gray;*/}
.highslide:hover img {border-color: silver;}
.highslide-wrapper, .drop-shadow {background: white;}
.highslide-image {border: 10px solid white;}
.highslide-image-blur {}
.highslide-heading{ text-align:center; font-weight:bold; font-size:12px; background-color:#FFFFFF;}
.highslide-caption {
   display: none;
   border: 0px solid #745224;
   font-family: Verdana, Helvetica;
padding:10px;
padding-top:0px;
background: white;
text-align:left;
color:#666666;
font-size:10px;
text-align:justify;
}
.highslide-loading {
   display: block;
color: black;
font-size: 8pt;
font-family: sans-serif;
font-weight: bold;
   text-decoration: none;
padding: 2px;
border: 1px solid black;
   background-color: white;
   padding-left: 22px;
   background-image: url(highslide/graphics/loader.white.gif);
   background-repeat: no-repeat;
   background-position: 3px 1px;
}

a.highslide-credits,a.highslide-credits i {
   padding: 2px;
   color: silver;
   text-decoration: none;
font-size: 10px;
}
a.highslide-credits:hover,a.highslide-credits:hover i {
   color: white;
   background-color: gray;
}
a.highslide-full-expand {
background: url(highslide/graphics/fullexpand.gif) no-repeat;
display: block;
margin: 0 10px 10px 0;
width: 34px;
height: 34px;
}
.highslide-overlay {display: none;}

/* Mac-style close button */
.closebutton {
position: relative;
top: -20px;
left: 20px;
width: 30px;
height: 30px;
cursor: hand; /* ie */
cursor: pointer; /* w3c */
background: url(highslide/graphics/close.png);
/* For IE6, remove background and add filter */
_background: none;
_filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(src='highslide/graphics/close.png', sizingMethod='scale');
}

</style>
<meta http-equiv="Content-Type" content="text/html; charset=<?php echo CHARSET; ?>">
<title><?php echo TITLE; ?></title>
<base href="<?php echo (($request_type == 'SSL') ? HTTPS_SERVER : HTTP_SERVER) . DIR_WS_CATALOG; ?>">
<link rel="stylesheet" type="text/css" href="stylesheet.css">
</head>
<body marginwidth="0" marginheight="0" topmargin="0" bottommargin="0" leftmargin="0" rightmargin="0">
<!-- header //-->
<?php require(DIR_WS_INCLUDES . 'header.php'); ?>
<!-- header_eof //-->

<!-- body //-->
<table border="0" width="100%" cellspacing="3" cellpadding="3">
 <tr>
   <td width="<?php echo BOX_WIDTH; ?>" valign="top"><table border="0" width="<?php echo BOX_WIDTH; ?>" cellspacing="0" cellpadding="2">
<!-- left_navigation //-->
<?php require(DIR_WS_INCLUDES . 'column_left.php'); ?>
<!-- left_navigation_eof //-->
   </table></td>
<!-- body_text //-->
   <td width="100%" valign="top"><table border="0" width="100%" cellspacing="0" cellpadding="0">
     <tr>
       <td><table border="0" width="100%" cellspacing="0" cellpadding="0">
         <tr>
           <td class="pageHeading"><?php echo HEADING_TITLE; ?></td>
           <td class="pageHeading" align="right"><?php echo tep_image(DIR_WS_IMAGES . 'table_background_specials.gif', HEADING_TITLE, HEADING_IMAGE_WIDTH, HEADING_IMAGE_HEIGHT); ?></td>
         </tr>
       </table></td>
     </tr>
     <tr>
       <td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>
     </tr>
     <tr>
       <td><table border="0" width="100%" cellspacing="0" cellpadding="2">
         <tr>
           <td class="main">
			<table width="100%">
			<?php
				$aantal_kol = 4;
				$rij = 1;
				$kolom = 1;
				//aantal foto's in elke map bepalen
				$dir = "gallery/";
				$sql = mysql_query("SELECT * FROM gallery");
				while($fotos = mysql_fetch_array($sql)){
					$file = $fotos['cID']."_".$fotos['pID'].".jpg";
					$auteur = mysql_fetch_array(mysql_query("SELECT customers_firstname,customers_lastname FROM customers WHERE customers_id=".$fotos['cID']));
					if ($kolom == 1) {echo "\n".'<tr>';}
					echo "\n".'<td align="center"><a id="autoload'.$fotos['cID'].$fotos['pID'].'" href="' . tep_href_link($dir.$file) . '" class="highslide" onclick="return hs.expand(this,{headingText: \''.$fotos['title'].'\'})">'.tep_image($dir . $file, '', 150, 150, 'hspace="5" vspace="5"').'</a>';					
					echo '<div class="highslide-caption"><div style="text-align:center;margin-top:-2px;">'.AUTEUR.' '.$auteur['customers_firstname']." ".$auteur['customers_lastname']."</div><p>";

					if ($fotos['description'] != '') {
						echo '<div style="font-style:italic;border:1px solid #666666;background:#ffffcc">'.$fotos['description'].'</div><p>';
					}

					//bestaande commentaar uitlezen
					$comment = explode('<-->',$fotos['comment']);
					echo '<div style="font-style:italic;border:1px solid #666666;background:#ffffcc">'.stripslashes($fotos['description']).'</div><p>';
						foreach ($comment as $val) {
							$commentaar = explode ('///',$val);
							echo '<b>'.$commentaar[0] . "</b>: ".$commentaar[1].'<hr style="border:0px;border-top:1px solid #666666;">';
						}
					} else {
						echo TEXT_NO_COMMENTS.'<hr style="border:0px;border-top:1px solid #666666;">';
					}
					echo '<b>'.stripslashes($commentaar[0]) . "</b>: ".stripslashes($commentaar[1]).'<hr style="border:0px;border-top:1px solid #666666;">';

					//nieuwe commentaar
					echo '<form name="form'.$fotos['cID'].$fotos['pID'].'" action="gallery_process.php" method="POST">';
					echo '<input type="text" name="comment_naam" value="'.TEXT_NAME.'" onClick="this.value=\'\'">';
					echo '<input type="hidden" name="cID" value="'.$fotos['cID'].'">';
					echo '<input type="hidden" name="pID" value="'.$fotos['pID'].'">';
					echo '<textarea name="comment_tekst" onClick="this.value=\'\'">'.TEXT_COMMENT.'</textarea>';
					echo '<input type="submit" name="action" value="ok"></form>';

					echo '</div></td>';
					if ($kolom == $aantal_kol) {
						echo '</tr>';
						$kolom = 0;
					}
					$rij ++;
					$kolom ++;
				}
				if ($kolom <= $aantal_kol) {echo '</tr>';}
			?>
			<div id="closebutton" class="highslide-overlay closebutton" onClick="return hs.close(this)" title="Close"></div>

			</table><p><?php echo TEXT_LINK; ?>
</p>
		</td>
         </tr>
       </table></td>
     </tr>
     <tr>
       <td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>
     </tr>
     <tr>
       <td><table border="0" width="100%" cellspacing="1" cellpadding="2" class="infoBox">
         <tr class="infoBoxContents">
           <td><table border="0" width="100%" cellspacing="0" cellpadding="2">
             <tr>
               <td width="10"><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td>
               <td align="right"><?php echo '<a href="' . tep_href_link(FILENAME_DEFAULT) . '">' . tep_image_button('button_continue.gif', IMAGE_BUTTON_CONTINUE) . '</a>'; ?></td>
               <td width="10"><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td>
             </tr>
           </table></td>
         </tr>
       </table></td>
     </tr>
   </table></td>
<!-- body_text_eof //-->
   <td width="<?php echo BOX_WIDTH; ?>" valign="top"><table border="0" width="<?php echo BOX_WIDTH; ?>" cellspacing="0" cellpadding="2">
<!-- right_navigation //-->
<?php require(DIR_WS_INCLUDES . 'column_right.php'); ?>
<!-- right_navigation_eof //-->
   </table></td>
 </tr>
</table>
<!-- body_eof //-->

<!-- footer //-->
<?php require(DIR_WS_INCLUDES . 'footer.php'); ?>
<!-- footer_eof //-->
<br>
</body>
</html>
<?php require(DIR_WS_INCLUDES . 'application_bottom.php'); ?>

Edited by Design Recollections
Link to comment
Share on other sites

seems like you did it wrong.

 

Please use the files provided in the ZIP file, and do the bugfix from there. Right now you have replaced the wrong lines, hence the new error.

 

It may help everyone to know that the new lines are very similar to the old ones, except for some variables that are now inside either the addslashes() function, or stripslashes() function.

Edited by killerwhale65

Matthias Thoen

my contribution: Photo Gallery for osCommerce

--check my homepage in my CARD--

Link to comment
Share on other sites

You have a syntax error in your installation documents (left out opening php statement):

 

http://oscommerce-photo-gallery.micrograph...nt=installation

 

Step 5: open account.php, and look for the following code, around line 153:

 

<tr>
<td class="main">echo tep_image(DIR_WS_IMAGES . 'arrow_green.gif') . ' <a href="' . tep_href_link(FILENAME_ACCOUNT_PASSWORD, '', 'SSL') . '">' . MY_ACCOUNT_PASSWORD . '</a>'; ?></td>
</tr>

 

should be:

 

				  <tr>
			 <td class="main"><?php echo tep_image(DIR_WS_IMAGES . 'arrow_green.gif') . ' <a href="' . tep_href_link('gallery_user.php') . '">' . MY_GALLERY . '</a>'; ?></td>
			  </tr>

Edited by 1quicksi
Link to comment
Share on other sites

You have a syntax error in your installation documents (left out opening php statement):

 

http://oscommerce-photo-gallery.micrograph...nt=installation

 

Step 5: open account.php, and look for the following code, around line 153:

Thanks, i have updated the installation instructions.

Matthias Thoen

my contribution: Photo Gallery for osCommerce

--check my homepage in my CARD--

Link to comment
Share on other sites

Thanks, i have updated the installation instructions.

 

Matthias

 

You made a great contribution but i hope that you will post a new version on the contribution page.

The errors are not gone and for all the php numbs like me there isn't a solution to solve the problems.

(i know my english is bad, Dutchman will try)

 

When do you think you have complete the new 0.6 version.

Because i think many people will work with your great contribution.

Thanks again and i will wait!

 

Greetings Armand

Link to comment
Share on other sites

Matthias

 

You made a great contribution but i hope that you will post a new version on the contribution page.

The errors are not gone and for all the php numbs like me there isn't a solution to solve the problems.

(i know my english is bad, Dutchman will try)

 

When do you think you have complete the new 0.6 version.

Because i think many people will work with your great contribution.

Thanks again and i will wait!

 

Greetings Armand

 

I will post my errors, maybe you will recognize them:

Another question: Where can i post the image title and description?

 

The errors:

1) In the gallery_user.php (edit) there are 2 errors:

Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in /home/autolief/domains/website.com/public_html/catalog/gallery_process.php on line 35

 

Line 35 in this file:

$bestaande_comment = mysql_fetch_array(mysql_query("SELECT comment FROM gallery WHERE cID=".$cID." AND pID=".$pID));

 

2) Warning: Cannot modify header information - headers already sent by (output started at /home/autolief/domains/website.com/public_html/catalog/gallery_process.php:35) in /home/autolief/domains/website.com/public_html/catalog/gallery_process.php on line 43

 

Hopefully someone can help

Armand

Link to comment
Share on other sites

Feature request:

 

A way for an admin to globally manage any and all images (ability to remove), comments, etc.

 

Thanx for a great contribution!!!

Comments is already planned, and i have added images. You can see future plans here: http://oscommerce-photo-gallery.micrograph...?content=future

 

Matthias

 

You made a great contribution but i hope that you will post a new version on the contribution page.

The errors are not gone and for all the php numbs like me there isn't a solution to solve the problems.

(i know my english is bad, Dutchman will try)

 

When do you think you have complete the new 0.6 version.

Because i think many people will work with your great contribution.

Thanks again and i will wait!

 

Greetings Armand

The problem here is that i cannot reproduce any errors. And as long i do not know what is wrong, i cannot fix it. Some people run it without problems, others run into problems. I have running 2 copies without problems myself, one on my system and one on a clients live website. Have you tried the bugfix: http://www.oscommerce.com/forums/index.php?sho...t&p=1302705

 

I will post my errors, maybe you will recognize them:

Another question: Where can i post the image title and description?

 

The errors:

1) In the gallery_user.php (edit) there are 2 errors:

Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in /home/autolief/domains/website.com/public_html/catalog/gallery_process.php on line 35

 

Line 35 in this file:

$bestaande_comment = mysql_fetch_array(mysql_query("SELECT comment FROM gallery WHERE cID=".$cID." AND pID=".$pID));

 

2) Warning: Cannot modify header information - headers already sent by (output started at /home/autolief/domains/website.com/public_html/catalog/gallery_process.php:35) in /home/autolief/domains/website.com/public_html/catalog/gallery_process.php on line 43

 

Hopefully someone can help

Armand

There is a small "how to use" guide on the website: http://oscommerce-photo-gallery.micrograph...php?content=use

 

error1: replace line 35 with

$bestaande_comment = mysql_fetch_array(mysql_query("SELECT comment FROM gallery WHERE cID=".$cID." AND pID=".$pID)) or die(mysql_error());

and give me the new error

 

Error2 is probably connected with error1.

Matthias Thoen

my contribution: Photo Gallery for osCommerce

--check my homepage in my CARD--

Link to comment
Share on other sites

Comments is already planned, and i have added images. You can see future plans here: http://oscommerce-photo-gallery.micrograph...?content=future

 

 

The problem here is that i cannot reproduce any errors. And as long i do not know what is wrong, i cannot fix it. Some people run it without problems, others run into problems. I have running 2 copies without problems myself, one on my system and one on a clients live website. Have you tried the bugfix: http://www.oscommerce.com/forums/index.php?sho...t&p=1302705

 

 

There is a small "how to use" guide on the website: http://oscommerce-photo-gallery.micrograph...php?content=use

 

error1: replace line 35 with

$bestaande_comment = mysql_fetch_array(mysql_query("SELECT comment FROM gallery WHERE cID=".$cID." AND pID=".$pID)) or die(mysql_error());

and give me the new error

 

Error2 is probably connected with error1.

 

Hi there!

 

Thanks for your help.

I have changed the query on line 35 and after that there is 1 problem left:

 

Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in /home/autolief/domains/xxxxxxxx.com/public_html/catalog/gallery_process.php on line 35

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 'AND pID=' at line 1

 

Greetings and thanks again

Armand

Link to comment
Share on other sites

Comments is already planned, and i have added images. You can see future plans here: http://oscommerce-photo-gallery.micrograph...?content=future

 

 

The problem here is that i cannot reproduce any errors. And as long i do not know what is wrong, i cannot fix it. Some people run it without problems, others run into problems. I have running 2 copies without problems myself, one on my system and one on a clients live website. Have you tried the bugfix: http://www.oscommerce.com/forums/index.php?sho...t&p=1302705

 

 

There is a small "how to use" guide on the website: http://oscommerce-photo-gallery.micrograph...php?content=use

 

error1: replace line 35 with

$bestaande_comment = mysql_fetch_array(mysql_query("SELECT comment FROM gallery WHERE cID=".$cID." AND pID=".$pID)) or die(mysql_error());

and give me the new error

 

Error2 is probably connected with error1.

 

Mat,

 

Maybe these problems are because some people use MySQL 4 and PHP4 en i am using PhP 5 and MySQL 5?

Edited by Armandios
Link to comment
Share on other sites

Mat,

 

Maybe these problems are because some people use MySQL 4 and PHP4 en i am using PhP 5 and MySQL 5?

I am using these versions as well.

 

Comment out lines 35 - 43.

 

Above line 35 type: echo $cID." ".$pID;

 

Now add a new comment. After clicking OK you should see a white page. Let me know the text on that page.

 

Are you on a live site? If so please let me know the URL so i can check for myself.

Edited by killerwhale65

Matthias Thoen

my contribution: Photo Gallery for osCommerce

--check my homepage in my CARD--

Link to comment
Share on other sites

I am using these versions as well.

 

Comment out lines 35 - 43.

 

Above line 35 type: echo $cID." ".$pID;

 

Now add a new comment. After clicking OK you should see a white page. Let me know the text on that page.

 

Are you on a live site? If so please let me know the URL so i can check for myself.

 

Matt,

 

Sorry i am using MySQL 4 instead of 5.

The code: echo $cID." ".$pID; is added but no changes:

 

I am testing this great contribution on my oscommerce ( without shoppingbasket) website. Don't look at the lay-out.

You can find the The gallery: http://www.autoliefhebber.com/catalog/gallery.php

 

Let me know what i should change.

Thanks

Edited by Armandios
Link to comment
Share on other sites

Matt,

 

Sorry i am using MySQL 4 instead of 5.

The code: echo $cID." ".$pID; is added but no changes:

 

I am testing this great contribution on my oscommerce ( without shoppingbasket) website. Don't look at the lay-out.

You can find the The gallery: http://www.autoliefhebber.com/catalog/gallery.php

 

Let me know what i should change.

Thanks

Please comment out lines 35 - 43.

Matthias Thoen

my contribution: Photo Gallery for osCommerce

--check my homepage in my CARD--

Link to comment
Share on other sites

Matt,

 

Sorry i am using MySQL 4 instead of 5.

Can you export the gallery table once and paste te SQL file here? I can take a look and see if there are any differences between MYSQL4 & 5.

Edited by killerwhale65

Matthias Thoen

my contribution: Photo Gallery for osCommerce

--check my homepage in my CARD--

Link to comment
Share on other sites

Can you export the gallery table once and paste te SQL file here? I can take a look and see if there are any differences between MYSQL4 & 5.

 

Sorry for my late reply.

This is the export from gallery out of my database.

 

-- phpMyAdmin SQL Dump
-- version 2.8.2.4
-- [url="http://www.phpmyadmin.net"]http://www.phpmyadmin.net[/url]
-- 
-- Host: localhost
-- Generatie Tijd: 07 Sept 2008 om 18:40
-- Server versie: 4.1.21
-- PHP Versie: 4.4.4
-- 
-- Database: `autoliefhebber`
-- 

-- --------------------------------------------------------

-- 
-- Tabel structuur voor tabel `gallery`
-- 

CREATE TABLE `gallery` (
 `id` int(4) NOT NULL auto_increment,
 `cID` int(4) NOT NULL default '0',
 `pID` int(4) NOT NULL default '0',
 `comment` longtext collate latin1_general_ci NOT NULL,
 `title` varchar(255) collate latin1_general_ci NOT NULL default '',
 `description` longtext collate latin1_general_ci NOT NULL,
 PRIMARY KEY  (`id`)
) ENGINE=MyISAM AUTO_INCREMENT=68 DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci AUTO_INCREMENT=68 ;

-- 
-- Gegevens worden uitgevoerd voor tabel `gallery`
-- 

INSERT INTO `gallery` (`id`, `cID`, `pID`, `comment`, `title`, `description`) VALUES (60, 1, 5, 'Armand ///Leuke auto, zeker weten<-->your name///your comment...<-->j///j', '', ''),
(59, 1, 4, 'Ruben test///Mooie wagen zeg<-->your name///your comment...<-->your name///your comment...<-->hhh///gh', '', ''),
(58, 1, 3, '', '', ''),
(63, 1, 1, 'your name///your comment...', '', ''),
(65, 1, 6, '', '', ''),
(67, 1, 2, '', '', '');

Link to comment
Share on other sites

Hello again!

 

What do you mean by "please comment out lines 35 - 43"?

 

Can someone tell me how i can show the gallery images by place date.

Now the gallery is a complete mess of images with no structure.

When someone places 4 images the should be the last 4 images on top of the gallery.

How can i put the code " Order by date_added' or something in the gallery.php?

 

Greetings Armand

Link to comment
Share on other sites

Hello again!

 

What do you mean by "please comment out lines 35 - 43"?

Make those lines a comment, by placing // in front of them, so that this code is not executed.

 

Can someone tell me how i can show the gallery images by place date.

Now the gallery is a complete mess of images with no structure.

When someone places 4 images the should be the last 4 images on top of the gallery.

How can i put the code " Order by date_added' or something in the gallery.php?

 

Greetings Armand

Not possible in this version, but planned for the future, see the website.

If you want, you can tweak it of course, but you will have to add the date field to the database yourself, and then sort your query by date.

Matthias Thoen

my contribution: Photo Gallery for osCommerce

--check my homepage in my CARD--

Link to comment
Share on other sites

Hi Matt

 

Me again, with a fresh head and a fresh install I tired again and again and I still get the one original error

 

Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in /home/xxxxxxx/public_html/ribbonrie/gallery_process.php on line 7

 

I have spent so much time doing this its mad LOL! I shall wait and see what the future holds and keep up with the progress as I really love the idea of this contribution and the basic no frills gallery worked just fine. I am grateful for all your work.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...