<div class="gmail_quote">On Fri, Nov 27, 2009 at 12:13 PM, Carsten Haese <span dir="ltr"><<a href="mailto:carsten.haese@gmail.com">carsten.haese@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div class="im">Victor Subervi wrote:<br>
> The difficulty I am having is that for<br>
> some reason it's not inserting. The form inserts the first image but not<br>
> the second.<br>
<br>
</div>My guess is that you're not calling db.commit() after inserting the<br>
second image. (If you had shown your code, I wouldn't have to guess.)<br></blockquote><div><br>That was the logical guess and yes, it hit the target. I should have known better. Thank you.<br>Now, I have this line of code on another page that calls the images once the database is populated:<br>
<br>              print '<img src="getpic.py?pic=%d&id=%d" width="100"></td>\n' % (a, w)<br><br>This is looped through for every value of pic/id returned from the database, producing the following code on the Web page:<br>
<br><img src="getpic.py?pic=1&id=1" width="100"></td><br><img src="getpic.py?pic=1&id=2" width="100"></td><br><br>The problem here is that only one of the images prints on the said page! However, if I surf to those URLs, the images appear! Is it possible that because I'm passing values to the variables and perhaps simultaneously calling the script, that it can only fulfill the first request? Is there a way around that?<br>
TIA,<br>V<br></div></div>