Hi;<br>I have this code:<br><br> print 'select * from spreadsheets s join products p on p.Item=s.Item join productsCategories pc on p.ID=pc.ProductsID join categories c on pc.CategoryID=c.ID where s.Client="%s" order by c.Category, c.Parent' % (client,)<br>
cursor.execute('select * from spreadsheets s join products p on p.Item=s.Item join productsCategories pc on p.ID=pc.ProductsID join categories c on pc.CategoryID=c.ID where s.Client=%s order by c.Category, c.Parent', (client,))<br>
tmp = cursor.fetchall()<br> print tmp<br><br>Now, when I run the print of the mysql command in the mysql interpreter, it gives me the following data:<br><br>mysql> select * from spreadsheets s join products p on p.Item=s.Item join productsCategories pc on p.ID=pc.ProductsID join categories c on pc.CategoryID=c.ID where s.Client='Lincoln_Properties' order by c.Category, c.Parent;<br>
+-----+--------------------+-------+------------+--------+------+-----+------------+------------------------------------------------------+---------+-------+-----+------------+------------+----+-------------------+----------------------+<br>
| ID | Client | Multi | Item | Markup | Temp | ID | Item | Description | UOM | Cost | ID | ProductsID | CategoryID | ID | Category | Parent |<br>
+-----+--------------------+-------+------------+--------+------+-----+------------+------------------------------------------------------+---------+-------+-----+------------+------------+----+-------------------+----------------------+<br>
| 163 | Lincoln_Properties | 0 | 5349513 | 53.22 | NULL | 39 | 5349513 | 24833RNH 24" x 33 " 8 Mic Natural Can Liners | 1000/CS | 25.63 | 39 | 39 | 23 | 23 | Can Liners | Bags | <br>
| 156 | Lincoln_Properties | 0 | 5349520 | 30.00 | NULL | 31 | 5349520 | Can Liners Coreless 45 gal Clear | 250/CS | 28.69 | 31 | 31 | 23 | 23 | Can Liners | Bags | <br>
| 161 | Lincoln_Properties | 0 | 40x48Green | 99.32 | NULL | 37 | 40x48Green | Green Can Liners | 1000/cs | 17.56 | 37 | 37 | 23 | 23 | Can Liners | Bags | <br>
| 160 | Lincoln_Properties | 0 | 24x33Green | 60.04 | NULL | 36 | 24x33Green | Green Can Liners | 1000/CS | 20.27 | 36 | 36 | 23 | 23 | Can Liners | Bags | <br>
| 162 | Lincoln_Properties | 0 | 5349518 | 26.02 | NULL | 38 | 5349518 | 28048VNR01 40" x 48" HI-D | 250/CS | 25.63 | 38 | 38 | 1 | 1 | Facility Supplies | BASE | <br>
| 152 | Lincoln_Properties | 0 | 4440120 | 72.44 | NULL | 35 | 4440120 | 91315 Pearlescent White Lotion Gallon Soap | 4/CS | 17.85 | 35 | 35 | 67 | 67 | Liquid Hand | Soap | <br>
| 609 | Lincoln_Properties | 0 | 2030572 | 0.00 | 1 | 343 | 2030572 | Americo 20" Beige Floor Pad | 5/cs | 15.88 | 335 | 343 | 49 | 49 | Mats | Restaurant Paper/Pla | <br>
| 159 | Lincoln_Properties | 0 | 2028071 | 20.00 | NULL | 34 | 2028071 | 25025088 77 Sanisac Liner | 500/CS | 14.88 | 34 | 34 | 34 | 34 | Tampons | Bathroom Paper | <br>
| 158 | Lincoln_Properties | 0 | 2062866 | 33.31 | NULL | 33 | 2062866 | 7410 1/2 Fold Seat Cover | 3000/CS | 35.81 | 33 | 33 | 35 | 35 | Toilet Seat Cover | Bathroom Paper | <br>
| 155 | Lincoln_Properties | 0 | 5380447 | 30.00 | NULL | 30 | 5380447 | Scottfold Foldedd Towel 1-Ply White | 4375/CS | 35.00 | 30 | 30 | 33 | 33 | Toilet Tissue | Bathroom Paper | <br>
| 154 | Lincoln_Properties | 0 | 5207270 | 7.01 | NULL | 29 | 5207270 | Standard Roll Bath Tissue 2-Ply White | 80/CS | 43.50 | 29 | 29 | 33 | 33 | Toilet Tissue | Bathroom Paper | <br>
| 164 | Lincoln_Properties | 0 | 5207269 | 20.00 | NULL | 28 | 5207269 | 17713-00 Kleenex Cottonelle 2-Ply Toilet Tissue | 60/CS | 35.50 | 28 | 28 | 33 | 33 | Toilet Tissue | Bathroom Paper | <br>
| 157 | Lincoln_Properties | 0 | 5217344 | 17.49 | NULL | 32 | 5217344 | 1900-60 Kleenex Scottfold White Towel | 2400/CS | 26.81 | 32 | 32 | 32 | 32 | Towels | Bathroom Paper | <br>
+-----+--------------------+-------+------------+--------+------+-----+------------+------------------------------------------------------+---------+-------+-----+------------+------------+----+-------------------+----------------------+<br>
13 rows in set (0.00 sec)<br><br>You will notice there is this data therein:<br><br>| 609 | Lincoln_Properties | 0 | 2030572 | 0.00 | 1 | 343 | 2030572 | Americo 20" Beige Floor Pad | 5/cs | 15.88 | 335 | 343 | 49 | 49 | Mats | Restaurant Paper/Pla | <br>
<br>That particular item does *not* show up when I print tmp! That is, for some reason running the command through python *omits* this one data!! The only difference is that a flag in spreadsheets (Temp) is set to 1. Why on earth doesn't it work in python??<br>
TIA,<br>beno<br>