Hai.
Ik heb weer eens een probleempje... ik heb deze function:
En deze query:
Alleen hij update die query niet
ik heb al geprobeerd met ". en met . en met kan iemand me helpen
?
toevoeging op 7 mei 2012, 09:45:39:
You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 1 at line 1
Is de error nu. (Had niet anders verwacht
)
Ik heb weer eens een probleempje... ik heb deze function:
[COLOR= #0000BB]<?php[/COLOR] [URL="http://www.php.net/if"]if[/URL][COLOR= #007700]( ![/COLOR][URL="http://www.php.net/function_exists"]function_exists[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]mobile_user_agent_switch[/COLOR][COLOR= #007700]) ){
function[/COLOR] mobile_user_agent_switch[COLOR= #007700](){[/COLOR]
[COLOR= #0000BB]$device[/COLOR] [COLOR= #007700]=[/COLOR] [COLOR= #DD0000][/COLOR][COLOR= #007700];[/COLOR]
[URL="http://www.php.net/if"]if[/URL][COLOR= #007700]([/COLOR] [URL="http://www.php.net/stristr"]stristr[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$_SERVER[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]HTTP_USER_AGENT[/COLOR][COLOR= #007700]],[/COLOR][COLOR= #DD0000]ipad[/COLOR][COLOR= #007700]) ) {[/COLOR]
[COLOR= #0000BB]$device[/COLOR] [COLOR= #007700]=[/COLOR] [COLOR= #DD0000]"ipad"[/COLOR][COLOR= #007700];
}[/COLOR] [URL="http://www.php.net/else"]else[/URL] [URL="http://www.php.net/if"]if[/URL][COLOR= #007700]([/COLOR] [URL="http://www.php.net/stristr"]stristr[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$_SERVER[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]HTTP_USER_AGENT[/COLOR][COLOR= #007700]],[/COLOR][COLOR= #DD0000]iphone[/COLOR][COLOR= #007700]) ||[/COLOR] [URL="http://www.php.net/strstr"]strstr[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$_SERVER[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]HTTP_USER_AGENT[/COLOR][COLOR= #007700]],[/COLOR][COLOR= #DD0000]iphone[/COLOR][COLOR= #007700]) ) {[/COLOR]
[COLOR= #0000BB]$device[/COLOR] [COLOR= #007700]=[/COLOR] [COLOR= #DD0000]"iphone"[/COLOR][COLOR= #007700];
}[/COLOR] [URL="http://www.php.net/else"]else[/URL] [URL="http://www.php.net/if"]if[/URL][COLOR= #007700]([/COLOR] [URL="http://www.php.net/stristr"]stristr[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$_SERVER[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]HTTP_USER_AGENT[/COLOR][COLOR= #007700]],[/COLOR][COLOR= #DD0000]blackberry[/COLOR][COLOR= #007700]) ) {[/COLOR]
[COLOR= #0000BB]$device[/COLOR] [COLOR= #007700]=[/COLOR] [COLOR= #DD0000]"blackberry"[/COLOR][COLOR= #007700];
}[/COLOR] [URL="http://www.php.net/else"]else[/URL] [URL="http://www.php.net/if"]if[/URL][COLOR= #007700]([/COLOR] [URL="http://www.php.net/stristr"]stristr[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$_SERVER[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]HTTP_USER_AGENT[/COLOR][COLOR= #007700]],[/COLOR][COLOR= #DD0000]android[/COLOR][COLOR= #007700]) ) {[/COLOR]
[COLOR= #0000BB]$device[/COLOR] [COLOR= #007700]=[/COLOR] [COLOR= #DD0000]"android"[/COLOR][COLOR= #007700];
}[/COLOR]
[URL="http://www.php.net/if"]if[/URL][COLOR= #007700]([/COLOR] [COLOR= #0000BB]$device[/COLOR] [COLOR= #007700]) {[/COLOR]
[URL="http://www.php.net/return"]return[/URL] [COLOR= #0000BB]$device[/COLOR][COLOR= #007700];
}[/COLOR] [URL="http://www.php.net/return"]return[/URL] false[COLOR= #007700]; {[/COLOR]
[URL="http://www.php.net/return"]return[/URL] false[COLOR= #007700];
}
}
}[/COLOR] ?> En deze query:
[COLOR= #0000BB]<?php $viaquery[/COLOR] [COLOR= #007700]=[/COLOR] [URL="http://www.php.net/mysql_query"]mysql_query[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]"UPDATE leden SET via = .mobile_user_agent_switch WHERE member_id="[/COLOR][COLOR= #007700].[/COLOR][COLOR= #0000BB]$_SESSION[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]id[/COLOR][COLOR= #007700]].[/COLOR][COLOR= #DD0000]""[/COLOR][COLOR= #007700]);[/COLOR]
[URL="http://www.php.net/if"]if[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$viaquery[/COLOR][COLOR= #007700]) {[/COLOR]
[URL="http://www.php.net/echo"]echo[/URL][COLOR= #DD0000]"Gelukt"[/COLOR][COLOR= #007700];
}[/COLOR] [URL="http://www.php.net/else"]else[/URL] [COLOR= #007700]{[/COLOR]
[URL="http://www.php.net/echo"]echo[/URL] [URL="http://www.php.net/mysql_error"]mysql_error[/URL][COLOR= #007700]();
}[/COLOR] ?> Alleen hij update die query niet
ik heb al geprobeerd met ". en met . en met kan iemand me helpen
?toevoeging op 7 mei 2012, 09:45:39:
You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 1 at line 1
Is de error nu. (Had niet anders verwacht
)


Maarja tnx