kenwvs Posted August 8, 2006 Share Posted August 8, 2006 I am trying to get this code to work but I am not sure how to set the value for the $contact. The Work=Contact is the problem. Work is in the database, but Contact is not. Basically, I have a form that I put the data in, and it calls it up from the database by Work.Ken[code]include_once "myconnect.php";$query=mysql_query('SELECT Work, Sched, Name, Site, Serial, Hours, Starts, Issue, Severity,Resolution, Assistance, PartsA, PartsB, PartsC, PartsD, PartsE, PartsF, PartsG,Safety, Image1, Image2, Image3, Image4 FROM workorder WHERE Work=($Contact)')or die(mysql_error());?>[/code] Link to comment https://forums.phpfreaks.com/topic/16922-setting-a-value/ Share on other sites More sharing options...
Daniel0 Posted August 8, 2006 Share Posted August 8, 2006 [code]<?phpinclude_once "myconnect.php";$query=mysql_query('SELECT * FROM workorder WHERE Work={$Contact}')or die(mysql_error());?>[/code]Try that. Instead of all those field names I used an * meaning all fields. Link to comment https://forums.phpfreaks.com/topic/16922-setting-a-value/#findComment-71260 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.