mysql_real_query causing segmentation fault for binary select

2009-12-04 Thread Michael Pawlowsky
I am trying top run these 2 SELECT queries using mysql_real_query in MySQL-C. The only difference between them is changing the first hex value from 41 to 01. It if is 41, the query runs fine. When I change it to 01 I get the following segmentation fault. segfault at 0 ip 00402be6 sp 00

How to create a relationship to another row in the same table

2009-10-03 Thread Michael Pawlowsky
I'm having a hard time trying to find the best way to create a relationship between two rows in the same table. I have a database that describes network equipment. There is a table called devices that contains information about the device. There is another table called ports that describ

Select ENUM values

2004-08-24 Thread Michael Pawlowsky
I'm wondering if there is a better way to select the values of a ENUM field. I have a ENUM field called greeting that has 'Mr.','Mrs.','Ms.','Dr.' in it. I need to put these in a HTML select. Right now I'm doing a "SHOW COLUMNS FROM global_lead LIKE 'greeting'" and then parsing out the response fo