Skip to content
Advertisement

Tag: mysql

Show only user from the same company

I want ask how it’s possible when an user Type=Chef logs into the website, in the Dashboard it only shows the user from his company Foreign key (fk_FirmaID). I don’t how process it to only show a specific company. Here is my code that I have for the moment. When an user is logging in I’m saving his user details

MySQL – Join part of query to a new query?

I’ve got the following code which queries a table. Then it uses the result to make another query. That result is then used to make a third query. But how do I grab the userid field from the 2nd query in order to grab a name from a users table and join that to the result of the 3rd query?

DataTables can’t read more than one Data

I would like to ask why is the DataTable can’t read more than 1 data in my Database? I would appreciate any help since I’m relatively new with the Data Table, thank you. As you can see it’s only showing 1 to 1 of 1 entries. But as seen in the table I have 5 retrieved data. and when I

How to instantly suspend user and not after user log out

I have one script that works via mysql and php. Now I have a problem, namely if the user does not pay the monthly subscription, it is necessary after 10 days from the day of the invoice creation to suspend the user’s account but the problem is: the user account is suspended only after the user is log out of

Delete big chunk of data with where clause gives time-out

I’m trying to delete over 2 millions records with this statement And I get 504 error time-out, when I try the same statement with select instead of delete it works, there is an index on event_tstamp column. Any idea what could be the problem? Answer delete is a much more expensive operation than select. The deletes have to be logged,

Insert a php string as multiple rows on MySQL table

I have a table with more than 750 rows of data that I paste on a textarea and get as a single string variable, then I pass the data as just one string thru an ajax and I want to insert it on my database in just one INSER INTO line Is there a way to make this work, I

Advertisement