Jump to content


Setting a Value

  • Please log in to reply
1 reply to this topic

#1 kenwvs

  • Members
  • PipPipPip
  • Advanced Member
  • 194 posts

Posted 08 August 2006 - 05:27 PM

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.


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())

#2 Daniel0

  • Staff Alumni
  • Advanced Member
  • 11,956 posts

Posted 08 August 2006 - 05:33 PM

include_once "myconnect.php";
$query=mysql_query('SELECT * FROM workorder WHERE Work={$Contact}')or die(mysql_error())

Try that. Instead of all those field names I used an * meaning all fields.

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users