[SOVED] Codeigniter : Insert Mysql With Whitespace Field


Okay, I updated the code in /system/database/DB_driver.php by modifying the code in the _insert function.

From the initial code as follows:
protected function _insert ($table, $keys, $values)
{
return 'INSERT INTO'. $table. '('. implode (',', $keys). ') VALUES ('. implode (',', $values). ')';
}

Becomes

protected function _insert ($table, $keys, $values)
{
$keys = str_replace ('` `', ' ', $keys);
return 'INSERT INTO'. $ table. '('. implode (',', $keys). ') VALUES ('. implode (',', $values). ')';
}

this method helps me insert using a query builder on columns that have whitespaces.

5 Responses to "[SOVED] Codeigniter : Insert Mysql With Whitespace Field"

  1. Many men and women struggle with drug and alcohol use addiction treatment in boca raton along with mental illness. In 2018, an estimated 9.2 million people in the U.S. struggled with co-occurring disorders like this, according to the Substance Abuse and mental Health Services Administration.

    BalasHapus
  2. lethal dose of gabapentin is a hallucinogenic drug. This means that when consumed, it causes the user to have unusual experiences such as hearing sounds, seeing illusions, and feeling things that are not actually there. A drug with an extensive history of both medicinal and recreational use, LSD use does not come without risks. An acid trip can last 12 hours or more, and when it goes wrong it can go terribly wrong. This substance is common at raves, parties, and music festivals, so knowing what acid looks like and understanding the risks is imperative, especially for young adults and teenagers.

    BalasHapus
  3. benzodiazepine addiction treatment in nj Is it accurate to say that you are looking for unrivaled medication and liquor recovery, detox, and double determination treatment that is top notch? We Level Up New Jersey habit treatment focus flawlessly joins these cutting edge treatment modalities and then some, alongside remodeled offices, all around prepared enslavement subject matter experts, and remedial groups.

    BalasHapus
  4. The We Level Up FL tamarac drug rehab emotional wellness community is an exceptionally particular, present day, forward-thinking office giving imaginative conduct recuperation treatment programs. Treatments happen in a serene manicured setting with open air unwinding regions offering restoration spaces. Giving science-based psychological wellness medicines intended for every customer and conveyed through profoundly customized individual consideration.

    BalasHapus
  5. The southern california drug detox stage is the initial phase in treating liquor addiction. Withdrawal indications normally die down inside around one to about fourteen days subsequent to beginning detox; be that as it may, this could take longer relying upon the seriousness of your Alcohol Use Disorder (AUD). From that point, you will actually want to zero in on different parts of the recuperation cycle, like various exercises, treatments, advising meetings, and backing choices.

    BalasHapus