Jump to content

petschephp

New Members
  • Posts

    4
  • Joined

  • Last visited

Everything posted by petschephp

  1. I'm trying to select all users who do not belong to a specific team_id, but it's not working correctly. I have two database tables users: id, username, password users_teams: id, user_id, team_id Code: SELECT * FROM users LEFT OUTER JOIN users_teams ON users_teams.user_id=users.id WHERE users_teams.team_id != '.$team_id
  2. Here is the code. It works, but I just can't figure out how to get the features to display. // load SimpleXML $cars = new SimpleXMLElement('inventory.xml', null, true); echo <<<EOF <table> <tr> <th>ID</th> <th>Stock Number</th> <th>InventoryDate</th> <th>CreatedDate</th> <th>VIN</th> <th>TYPE</th> <td>Features</td> </tr> EOF; foreach($cars as $car) // loop through our cars { echo <<<EOF <tr> <td>{$car->ID}</td> <td>{$car->StockNum}</td> <td>{$car->InventoryDate}</td> <td>{$car->CreatedDate}</td> <td>{$car->VIN}</td> <td>{$car->TYPE}</td> <td></td> </tr> EOF; } echo '</table>';
  3. I am trying to parse a XML file using SimpleXML, but I can't figure out how to display <Category> name and each <feature> Here's a example of the XML file. <Vehicle> <Description>To set an appointment callor email </Description> <Features> <Category Name="Comfort"> <Feature>Front Air Conditioning</Feature> <Feature>Front Air Conditioning Zones: Single</Feature> <Feature>Front Air Conditioning: Climate Control</Feature> </Category> </Features> </Vehicle>
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.