Jump to content

igorek24

Members
  • Content Count

    10
  • Joined

  • Last visited

Community Reputation

0 Neutral

About igorek24

  • Rank
    Member
  1. Here is the result: public function odometer($carID) { $mileage = str_split($this->pullMileageLastRecord($carID)); $output = ""; foreach ($mileage as $mile) { $output .= "<img src='img/speedo-numbers/$mile.gif' alt='$mile'>"; } return $output; }
  2. str_split is what I was looking for. Thank you so much everyone!
  3. How can I display an image for a number? For example, if I have a number 185 that I pulle from DB, I would like to rendered as html as: <img src="1.jpg" alt="1"> <img src="8.jpg" alt="8"> <img src="5.jpg" alt="5"> Any help would be greatly appreciated.
  4. That seems to work just like I want it. Thank you so much
  5. Hi all, can someone help me to limit output from SELECT query to unique row only on php page. When I join a veh_services table to vehicles, and there are multiple rows in veh_services with the same veh_id, it outputs multiple rows with the same veh_id. My query: SELECT username, vehicles.veh_id, year, veh_make.make_title, veh_model.model_title, veh_registration.policy_num, cylinder_count, eng_hp, trans, int_color, ext_color, fuel_tank, date_format(veh_services.date,'%m/%d/%Y') as servdate FROM vehicles LEFT JOIN (veh_make, veh_model) ON (vehicles.model_id = veh_model.model_id) AND (vehicles.make_id = veh_make.make_id) LEFT JOIN (veh_registration) ON (vehicles.reg_id = veh_registration.reg_id) JOIN (users) on (vehicles.user_id = users.user_id) left JOIN (veh_services) ON (veh_services.veh_id = vehicles.veh_id) WHERE users.user_id = 2 I've created a temp user in my phpMyAdmin: User: help Pass: Password01 Here is my DB typology and here is my source code and the webpage
×
×
  • 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.