New answers tagged

0

I agree with the basic idea that Naisa had, but I would use a 'real' table instead of a 'temp' table in case the server goes down before you get a chance to process the rows. In addition, you might want to add a column with the sysdatetime() so you can process the rows in the 'order' they were presented to the system.


0

If your database is Oracle, the best way to do this is to create a packaged procedure encapsulating everything you want to happen. This would include both inserting the row and doing the http request. The Oracle user used by the php script can then be given execute privileges on this package allowing the script to call the procedure. Not only is this more ...


0

first create one temp table , and create records whenever your updating row. for example if you are updating one row with id=24, save this id as refference id into temp table.then using Php if temp table contains any records call curl request and delete temp records once curl request is completed. by using cron jobs run this php scripts repeatedly


3

CREATE TABLE IF NOT EXISTS `tblproduct` ( `id` int(8) NOT NULL AUTO_INCREMENT, `name` varchar(255) NOT NULL, `code` varchar(255) NOT NULL, `image` text NOT NULL, `price` double(10,2) NOT NULL, PRIMARY KEY (`id`), UNIQUE KEY `product_code` (`code`) ) <<<<------- put semi-colon here. Your problem here is with the last line of your ...


3

It's a special datatype for storing ip addresses. It would be more compact that the string representation of the same information as well as type safe. inet An IP address. It can be either 4 bytes long (IPv4) or 16 bytes long (IPv6). There is no inet constant, IP address should be inputed as strings https://cassandra.apache.org/doc/cql3/CQL.html


0

I don't think this is the appropriate medium to be asking that question. What you can do is either visit YouTube and search for tutorials where they design attendance systems or you can contact a freelancer. For now you can take records in Microsoft Excel since it simpler to use and then migrate the data once you have a mysql database setup.


1

Always outer join them, then just use a CASE statement to pick out the info from the relevant table: SELECT ref_id, case when p.property_id is null then p2.property_id else p.property_id end FROM invoices i left outer join properties p on i.ref_id = p.property_id left outer join properties2 p2 on i.ref_id = p2.property_id;


1

You should revise your table structure. You are trying to put too many different things into one table. What you could do is have multiple tables like so: Table: site Has an ID and all other details about the site! Table: Devices Has an ID and all other details about the device. Table: measurements Has an ID and all other details about the measurement....


2

No, Laravel does not backup your database data. It is simply a PHP framework. The only thing Laravel backs up as far as the database goes is the table schema if you used the migration features in the framework. Cloud infrastructures like Amazon routinely have nightly backups if using their RDS service. Your ability to recover the lost data depends on the ...


0

Setup: Take a mysqldump of the 'default' data. Put the output into a Stored Procedure. Modify the stored procedure to also CREATE DATABASE and USE that database. The database name would be dynamic -- probably the user id, with something prepended to avoid naming conflicts. Also surround with backtics. User comes in: perform that stored procedure. ...


1

It seems you haven't added to service account as a database user to customdb: USE customdb; CREATE USER [NT AUTHORITY\SYSTEM]; You will also need to grant the needed permissions on database objects to allow a minimally privileged user to access data. I suggest you do this via role membership to facilitate manageability: USE customdb; CREATE ROLE ...


0

Based on the accepted answer on Stack Overflow here, you can adapt it to fit your requirements: select * from emp_unavailablity, (select adddate('1970-01-01',t4.i*10000 + t3.i*1000 + t2.i*100 + t1.i*10 + t0.i) datelist from (select 0 i union select 1 union select 2 union select 3 union select 4 union select 5 union select 6 union select 7 union select 8 ...


1

Case 1: An extra table or database will eventually be pushed out of cache. It is harmless. Cure (but not worth doing): restart mysqld. Case 2: The 'system' is building thousands of tables and/or databases. Each table/database involves at least one entry in the containing OS directory. As this directory gets fuller, the OS operations to access files/...



Top 50 recent answers are included