[thelist] Wierd MySQL Behavior

Rob Smith rob.smith at THERMON.com
Mon Apr 4 09:11:36 CDT 2005


Maybe I'm missing something here.. I was at this piece of SQL over the
weekend and while my (mysql_num_rows == 0), MySQL also said "returning 0 of
0 rows (Displaying 1 record)" And it actually showed the record that I
wanted to pull up.

For fun, here is the query:

SELECT v.vid, v.x_company, v.VendorDescription, w.productid,
p.ProductPicture FROM TMDVendors v, TMDProducts p, TMDVendoroftheWeek w
WHERE v.vid = p.vid AND v.vid = w.vid AND p.productid = w.productid AND
startdate <= '20050404' and enddate > '20050404'

The one record had a startdate of 20050403 and an enddate of 20052404

Any idea as to why I'm getting two different answers from the same query?

Rob Smith

More information about the thelist mailing list