statment

Java: creating a date object from a string and inserting into MySQL

Anytime I have to handle dates/times in java it makes me sad I'm trying to parse a string and turn it into a date object to insert in a preparepared statement. I've been trying to get this working but am having no luck. I also get the helpful error message when I go to compile the class. "Exception in thread "main" java.lang.Error: Un...

PHP PDO - output the prepared statment

Hallo, I use a prepared statment wiht PDO. and the method execute. I want to display the statment before it is executed, with the data replaced - the real 1:1 statment as a string? Any ideas? ...

jquery counting function. if statement

I am trying to write a bit of jquery to: if there is only one instance of the div which has a class of "option" take the href attribute and redirect to that href, this is what i have to far <script type="text/javascript"> var count =('Size: ' + $('.option').size()); if (count = 1) { $('.readmore a').each(function () { v...

SQL Select Return Default Value If Null

Database: MS SQL 2008 SELECT Listing.Title, Listing.MLS, Pictures.PictureTH, Pictures.Picture, Listing.ID FROM Listing INNER JOIN Pictures ON Listing.ID = Pictures.ListingID WHERE (Pictures.ID = (SELECT MIN(ID) FROM Pictures WHERE (ListingID = Listing.ID))) The issue is, I have several "Listings" without a Picture, and because of thi...