The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
MySQL / php help needed
Would someone be able to just check my code here and see where i've gone wrong.
PHP Code:
the if/else is so if the record exists it amends all records with 'user'=$user otherwise it makes a new record with their details. The code for adding/amending is already done and working just cant get the If/Else right Many thanks |
#2
|
||||
|
||||
Have you tried:
PHP Code:
|
#3
|
|||
|
|||
Try this:
PHP Code:
|
#4
|
|||
|
|||
Just solved it (i hope)
PHP Code:
One other thing i need to do though, is check that $quartertime conforms to some criteria it's a number figure to two decimal places....must be higher than 6, and in the followin format eg. 10.30, 11.99, 9.35 you get the idea, not overly sure how to check that. Thanks for your assistance guys |
#5
|
||||
|
||||
And changing this:
PHP Code:
PHP Code:
|
#6
|
|||
|
|||
well, that too LOL, i put $num and $result into the template so i could see what was going on and $result was returning a alhpanumeric tstring where $num was returning a numerical only result, anyone got any idea on checking the conformity of the $quartertime (edited in last post), i just know someone's gonna eventually realise they can add text in there and put something offensive on my site :P
|
#7
|
|||
|
|||
Couldn't you even do:
PHP Code:
|
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|