Hallo,
Ich steh gerade vor einem Problem.
Alles anzeigen
Je nach VOW Status (activ 2 oder eine andere zahl) sol er ein Entsprechendes Bild ausgeben. Problem ist nun allerding, in beiden Tabellen kommt activ vor. Wie kann ich dies in der IF Abfrage unterscheiden bzw. angeben das er dies aus VOW Werten soll?
Ich steh gerade vor einem Problem.
Quellcode
- $DB->set_sql('SELECT p.*, w.* FROM
- ' . COW . ' AS p,
- ' . VOW . ' AS w
- WHERE p.v_product_id = w.id
- AND p.customer_id =:1');
- $DB->execute($customer_id);
- while ($row = $DB->fetch_assoc()) {
- $row['created_at'] = $Core->userdate($row['created_at']);
- if ( $row['activ'] == 2 ) {
- $row['activ'] = '<a href="customer.php?page=show&id={$CUSTOMER_ID}&reaktiv_id={$list.vid}" title=""><img src="./theme/img/control.png"></a>';
- }
- else
- {
- $row['activ'] = '<a href="customer.php?page=show&id={$CUSTOMER_ID}&deaktiv_id={$list.vid}" title=""><img src="./theme/img/control-pause.png"></a> <a href="customer.php?page=show&id={$CUSTOMER_ID}&del_id={$list.vid}" title=""><img src="./theme/img/cross.png"></a>';
- }
- $vcontracts[] = $row;
- }
Je nach VOW Status (activ 2 oder eine andere zahl) sol er ein Entsprechendes Bild ausgeben. Problem ist nun allerding, in beiden Tabellen kommt activ vor. Wie kann ich dies in der IF Abfrage unterscheiden bzw. angeben das er dies aus VOW Werten soll?