Due to the overpopulation of jails based on the amount of drug related non-violent crimes and an increasing realization that jail doesn't help to rehabilitate drug addiction there are many states that are letting people with non-violent drug related offenses go through long term inpatient drug rehab instead of having to spend time in jail. In these cases, the courts generally do not find the rehab program for the individual who needs the help. The person needs to be accept to a drug rehab before he or she will be able to be released from the jail. There are many drug treatment centers that accept criminal justice clients and may also work together with different court houses to help the individual in question get into the program. It is fairly common for county courts to suggest rehab instead of jail.
Other courts that the individual may go to may require for them to go through a lot of hassles in order to have the program set up because they are less likely to use the option of rehab over jail time. In that situation, it would be better to work with a lawyer or public defender so that it would be easier for the person to be able to present the request to go to rehab instead of being locked up within the prison. The lawyer or public defend may be able to approach the district attorney and judge and then get the option approved instead of allowing the individual to serve jail time.
In prison, inmates spend most of their time with other inmates where they may be influenced negatively by the behavior of the other inmates that are present. They may be exposed to behaviors and realities that they would have never experienced while they were outside of the jail and this can have a negative impact on them which may cause them to become more interested in further drug use to deal with their emotions or crime to help support their drug use in the future.
Generally speaking, sending people to jail as a solution for their drug issue doesn't work very well. Prison tends to make people feel worse and may put them in circumstances where they are surrounded by more drugs or they make more contacts for drugs after they have finished getting out of jail. Keeping them out from the society for too long makes it difficult for them to adapt to their community when they return and may also make it easier for them to be triggered by the elements that were encouraging their drug use before. There are many people who suggest that those who are sentenced into prison instead of a drug rehab program should get themselves checked into a intensive drug program when they are released so that they can have an easier transition back into the rest of the society and help to reverse some of the bad habits they may have picked up while they were in the prison.