Skip to content

Tag: mysql

Call to undefined method CI_Loader::library()

When I want to submit a post a get this type of error. I try to change everything starting from database field to my view but every time when I run a code I get same error but can not see where is the problem Posts Controller Posts Model The error is in line 74, error message: Call to undefined

Xampp mysql Error: MySQL shutdown unexpectedly

when I starting mysql, giving the following error: then, I check the mysql_error.log: finally, I moved xampp/mysql/backup files into xampp/mysql/data and run mysql again.Then, it worked!But I don’t know why.What led to this problem. Hope someone doubts for me! Answer If you’re not running XAMPP as…

Laravel mysql avg() function

I am using Laravel on developing my new app. I have initiated average function on a rating column in my database table and now I am just curious how could I make the average value from “3.3333” into “3.3”. Answer You can use php’s inbuilt functions for rounding. In this case, you…

Ignoring characters in field string in MySQL

I’m pulling a list of names from a database; SELECT * FROM people ORDER BY name ASC However, some of the names are like [Mod]John, and these are all at the end of the list instead of in alphabetical …