Skip to content

Tag: mysql

How to store a array in a database?

I am trying to learn php databases and I have a question. How do I store an array in a database? I saw an answer on stackoverflow and there were they doing something with type double and in an other answer they were talking about creating a table for every user but I can’t find a solution. So summarized…

When do I have to close mysqli (Database) connection?

For now, I have one connect.php file e.g. In every other PHP file that uses MySQL queries, I use “include ‘connect.php’;” For Instance on W3Schools, they create for every query a new connection and then close it after use. See here: w3schools.com: I’m not sure if they do it just …

PHP MVC not sending value to controller

I have been making a MVC site, I am having trouble sending the row id from my form to my controller. The code that I am using for my form gets the row ID for each db entry and assigns it to a hidden value. When the form is submitted it sends the parameters to the controller (should send $uid)

MySQL how to make value expire?

So I’m currently designing a Forgot Password feature for a website. Basically, when the user clicks forgot password it sends them an email with a reset token. I want the reset token to expire in 48 hours(for security reasons). How would I do this in MySQL and PHP. I have a column in my table called rese…

How to join three table by laravel eloquent model

I have three table Articles table Categories table User table I want to show articles with their category name instead of category_id and user_name instead of user_id I try like these query It is work! But I want to do by Eloquent way. Please, how could I do? Answer With Eloquent it’s very easy to retri…

Use proxy to connect to a mysql db through PDO

I’m trying to connect to a remote mysql database with PHP PDO (php version 5.3) and I need it to go through a proxy. My connection looks like this right now. I’dd need it to go through a proxy, like http://proxy.mydomain.com:port I’ve searched through the PDO Doc and can’t seem to find…

how do I correctly use mysqli_stmt::bindParam()

I am having difficulty understanding how to properly use bindParam(); I have been following the details at the following URL: http://php.net/manual/en/pdo.prepared-statements.php which show the following as one of their examples: This example is obviously incomplete, however, it shows enough of the details th…

Vtiger 6.2 shows blank page after login [closed]

Closed. This question needs debugging details. It is not currently accepting answers. Edit the question to include desired behavior, a specific problem or error, and the shortest code necessary to reproduce the problem. This will help others answer the question. Closed last year. Improve this question I insta…