Skip to content
Advertisement

Tag: mariadb

delete or undo the first query if the second query did not work

im confused about this. Is there any way like to test if all queries are working and not returning erros? if so execute them or return something. I am building a signup method, this have 2 parts: loginInfo(username, password) and the usual Employee info (name, email, etc..). The signup method inserts the Employee info into employee table, then it gets

Import values from temporary table to another table?

I’m joining 3 tables: Currently, I’m fetching the data, build a new array and insert it into my final table. However, I wonder if it’s possible to do this in one go, so basically directly from the temporary table? Answer Yes. Use INSERT . . . SELECT: Note that I introduced table aliases. These make the query easier to write

Get last record of each ID

I have this query : which returns ALL records from the ID’s I was thinking of using CURDATE as in order to get last records but when a record is not modified a day (they usually do but sometimes this is not the case) I’m loosing the records . How would I modify the query to get the last entry

How can I use the data table pagination?

Now I’m calling up the whole data and using the data table to express it in a view. However, if there is a lot of data, rendering speed is slow. What should we do to improve? in this datatable code in this sql code and table view code What should I do to pagination using datatable and php and mariadb?

Fatal error: Query Failed! SQL: SELECT * INTO OUTFILE

I couldn’t understand why a query work as expected in PhpMyAdmin and from command line (mysql client) and not in PHP. Fatal error: Query Failed! SQL: SELECT * INTO OUTFILE ‘/var/www/html/domain.dom/tmp/qry_patients_11_11.csv’ FIELDS TERMINATED BY ‘,’ OPTIONALLY ENCLOSED BY ‘”‘ LINES TERMINATED BY ” ” FROM qry_patients ; – Error: in /var/www/html/domain.dom/export_csv.php on line 90 Line 90 and previous: After 2

Advertisement