Codes here !
Moderators: macek, egami, gesf
You find out here that id is not supplied to the script.
You give it a value so that any value in the database will be returned.
You could also give it some default value or give an error message and exit
LIKE "%" will allow ANY value, so if ID is not present it will allow any value.
You could check if ID is supplied to you're script and if it is not remove the %%.
LIKE is used for string-comparison.
Also, if you're trying to select a specific item you could better use:
, or when you want a range:
It will execute faster.
The speed will not really be noticed on small tables, but the moment they get much bigger you'll notice the difference.
Who is online
Users browsing this forum: No registered users and 2 guests