Contrary to urban myth, tourists only rarely get locked up in Tijuana. When it happens they usually deserve it. However, people get extorted by the cops all the time.
(The cops almost always release somebody who demands to see a judge and refuses to pay a bribe. In Tijuana a cop can't take you directly to jail. Judges are on duty 24/7 and the cops need an order from the judge to put somebody in jail. Which is why they let people go who haven't done anything wrong who demand to see a judge. However, the cops know most tourists don't know how the system works and they know most toursits are scared and think they'll end it in jail if they don't pay a bribe. So the cops use a tourist's fear and ignorance to extort money when they catch a tourist breaking the law.)
What the cops love is to catch people breaking the law, no matter how petty the violation. Then the system allows them to extort money "fair and square."
Mexican Rx laws are different from those in the U.S. In the U.S. a pharmacist must see a Rx to sell medication. In Mexico the consumer needs a Rx to buy (category IV) medication, like Viagra but isn't required to show it to the pharmacist.
(The reason for this practice is that many Mexicans are too poor to see a doctor. So in Mexico, like many third world countries, the pharmacist ends up being the health care giver. The law is designed with this in mind.)
Obviously this is a case of selective enforcement. The cops never enforce the Rx law against locals. (So much so that pharmacists and locals say you donโt need a Rx to buy things like Viagra. However, if you doubt my understanding of the law then read this
http://www.salud.gob.mx/unidades/cdi/nom/072ssa13.html.)
Of course, it is illegal for a cop to take a bribe, but Mexican culture tolerates โclean graftโ while condemning โdirty graft.โ In the U.S. when the cops catch you committing a victimless crime you are taken before a judge who fines you. Thatโs supposed to teach you not to do it again. In Mexico when the cops catch you committing a minor crime you pay a bribe and go about your business. That is supposed to teach you not to do it again.
(In the U.S. we have high taxes to pay big salaries for the cops, but the taxpayers grumble about paying high taxes. In Mexico the cops donโt get paid much by the taxpayers; the cops earns their living by catching people breaking the law and collecting bribes. Mexican taxpayers are happy, they see it as the criminals paying the cost of maintaining a police force. If a cop plants drugs on you to get a bride thatโs considered โdirty graftโ and isnโt socially acceptableโwhich doesnโt mean it doesnโt happen. Fortunately it doesnโt happen very often.)
Mexico is divided into two groups: those happy with the โold waysโ and those who want a first-world system without graft. The reformers are winning, but they have a long way to go before they completely eliminate corruption.
As somebody posted, when tourists have problems with the cops it is usually in one of two places: the Zona Norte or the line returning to the border. Usually the problems involves a traffic violation or behavior such as public drunkenness or possession of drugs/medication without a Rx.
When driving in Tijuana I park outside the Zona Norte and take an alternate route back to the border. (There are lots around 7th and 9th street I use. I use 10th Street to return to the border.) I also get and carry a Rx from a Mexican physician for the Levitra I use. (On another board I posted about Dr. Ramero. He and others will write a Rx for anything you say your U.S. physician has prescribed.) These practices give me peace of mind. (I almost never get stopped by the cops, so I canโt say theyโve saved me from paying any bribes.)
Now you know why the cops searched you hoping to find Viagra. Also why they let you go when they didnโt find it. And what you can do to prevent future problems.