|
One of the primary reasons for a DW is so reports and data analysis does not impact the production (relational database) system.
I hope your "data islands" are compatible, mapping disparate systems to a single platform can be a stone cold bitch!
Never underestimate the power of human stupidity -
RAH
I'm old. I know stuff - JSOP
|
|
|
|
|
I have Delphi 11 Alexandria Professional edition.
This edition includes Firedac but I can only access local databases (hosted on the same machine that the application executable).
Can I access to MySQL or SQL databases both local or remote using UNIDAC with my Delphi edition?
|
|
|
|
|
Their homepage states that it can.
Universal Data Access Components (UniDAC) for Delphi[^]
".45 ACP - because shooting twice is just silly" - JSOP, 2010 ----- You can never have too much ammo - unless you're swimming, or on fire. - JSOP, 2010 ----- When you pry the gun from my cold dead hands, be careful - the barrel will be very hot. - JSOP, 2013
|
|
|
|
|
Yes.
Bastard Programmer from Hell
"If you just follow the bacon Eddy, wherever it leads you, then you won't have to think about politics." -- Some Bell.
|
|
|
|
|
Looks like a license issue
Professional editions usually support Firedac without problem (at least on my side, still on Berlin version)
|
|
|
|
|
Hey
Ive tried the INNER, LEFT, RIGHT join but it doesnt seem as if my tables are connecting. I have tables with different names and none match. I also have a main table(login/register) and want the rest to connect to that. How do I go about doing this?
Thank ya
|
|
|
|
|
Post your SQL code and table definitions and you should get some help here.
|
|
|
|
|
Hey there I just posted my tables!!
|
|
|
|
|
MekaC wrote: How do I go about doing this? There is no way for anyone to tell you without seeing your tables. However, a generic answer is like this.
SELECT table1.*, table2.*
FROM table1
INNER JOIN table2 ON table1.field1 = table2.field1
MekaC wrote: I have tables with different names and none match. If no tables match then you can't connect them with your login code, but why would you want to anyway?
I don't think you are using the right words to expain youself.
|
|
|
|
|
Hey there I just posted my tables!!
|
|
|
|
|
OK, but what is the question now?
|
|
|
|
|
Here are my tables :
Table structure for table `categories`
--
CREATE TABLE `categories` (
`id` int(30) NOT NULL,
`name` varchar(250) NOT NULL,
`description` text NOT NULL,
`date_updated` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
-- --------------------------------------------------------
--
-- Table structure for table `comments`
--
CREATE TABLE `comments` (
`id` int(30) NOT NULL,
`topic_id` int(30) NOT NULL,
`user_id` int(30) NOT NULL,
`comment` text NOT NULL,
`date_created` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
`date_updated` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-- --------------------------------------------------------
--
-- Table structure for table `forum_views`
--
CREATE TABLE `forum_views` (
`id` int(30) NOT NULL,
`topic_id` int(30) NOT NULL,
`user_id` int(30) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
-- --------------------------------------------------------
--
-- Table structure for table `friendship`
--
CREATE TABLE `friendship` (
`friend_id` int(11) NOT NULL,
`receiver` varchar(30) NOT NULL,
`sender` varchar(30) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1 ROW_FORMAT=DYNAMIC;
-- --------------------------------------------------------
--
-- Table structure for table `member`
--
CREATE TABLE `member` (
`member_id` int(11) NOT NULL,
`username` varchar(30) NOT NULL,
`email` varchar(30) NOT NULL,
`sex` varchar(100) NOT NULL,
`password` varchar(30) NOT NULL,
`day` varchar(100) NOT NULL,
`month` varchar(30) NOT NULL,
`year` varchar(100) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1 ROW_FORMAT=DYNAMIC;
-- --------------------------------------------------------
--
-- Table structure for table `messages`
--
CREATE TABLE `messages` (
`messageid` int(11) NOT NULL,
`sender_id` int(11) NOT NULL,
`receiver_id` int(11) NOT NULL,
`message` varchar(5000) NOT NULL,
`date` date NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
-- --------------------------------------------------------
--
-- Table structure for table `myfriends`
--
CREATE TABLE `myfriends` (
`friend_id` int(11) NOT NULL,
`myid` varchar(30) NOT NULL,
`myfriends` varchar(30) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1 ROW_FORMAT=DYNAMIC;
-- --------------------------------------------------------
--
-- Table structure for table `output_images`
--
CREATE TABLE `output_images` (
`imageId` int(11) NOT NULL,
`imageType` varchar(255) NOT NULL,
`imageData` longblob NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
--
-- Dumping data for table `output_images`
--
EDIT: CHill60 - Hex Dump removed for readability
-- --------------------------------------------------------
--
-- Table structure for table `replies`
--
CREATE TABLE `replies` (
`id` int(30) NOT NULL,
`comment_id` int(30) NOT NULL,
`reply` text NOT NULL,
`user_id` int(11) NOT NULL,
`date_created` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
`date_updated` datetime NOT NULL DEFAULT '0000-00-00 00:00:00' ON UPDATE CURRENT_TIMESTAMP
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
-- --------------------------------------------------------
--
-- Table structure for table `tbl_member`
--
CREATE TABLE `tbl_member` (
`id` int(11) NOT NULL,
`username` varchar(255) NOT NULL,
`password` varchar(200) NOT NULL,
`email` varchar(255) NOT NULL,
`create_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
`comment` text NOT NULL,
`image` varchar(255) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
--
-- Dumping data for table `tbl_member`
--
INSERT INTO `tbl_member` (`id`, `username`, `password`, `email`, `create_at`, `comment`, `image`) VALUES
(1, 'meka', '$2y$10$J/echPaDjmOaPWswI.z9BOZ21D7kaylVDvK.zAL4hhRXS8qxhcrIW', 'coti032@gmail.com', '2021-08-27 21:10:05', '', '');
-- --------------------------------------------------------
--
-- Table structure for table `topics`
--
CREATE TABLE `topics` (
`id` int(30) NOT NULL,
`category_ids` text NOT NULL,
`title` varchar(250) NOT NULL,
`content` text NOT NULL,
`user_id` int(30) NOT NULL,
`date_created` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
-- --------------------------------------------------------
--
-- Table structure for table `users`
--
CREATE TABLE `users` (
`id` int(30) NOT NULL,
`name` text NOT NULL,
`username` varchar(200) NOT NULL,
`password` text NOT NULL,
`type` tinyint(1) NOT NULL DEFAULT '3' COMMENT '1=Admin,2=Staff, 3= subscriber'
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
--
modified 2-Nov-21 6:01am.
|
|
|
|
|
Please remove all that hexdump which serves no purpose.
|
|
|
|
|
I have edited this post to remove the hex dump of the image - it made the thing impossible to read.
Having given us your table structures how are they meant to link together? And what are you trying to link?
Try sharing just one of your queries that doesn't work so at least we've got something to start on
|
|
|
|
|
They're called relations.
Please say you don't do medical equipment.
Bastard Programmer from Hell
"If you just follow the bacon Eddy, wherever it leads you, then you won't have to think about politics." -- Some Bell.
|
|
|
|
|
I'm working on a PHP project, that started in SQL server 2000, and I just upgraded the PHP to support SQL Server 2008. Well now I would like to use OFFSET and FETCH to paginate long lists and I need 2012. I'm wondering if just next functions were added or if I need to change my dates again, CONVERT(char(10) createDate, 126) to another format.
If it ain't broke don't fix it
Discover my world at jkirkerx.com
|
|
|
|
|
Well, the major one would be that 2012 (v11) is still supported, while 2008 (10.5) isn't.
I don't remember of breaking changes between those versions, though. A slightly better UI for SSMS, maybe. But nothing about date formats which would have changed. I just remember this was the time I started to install db systems on virtual machines rather than on physical ones.
Regarding the date format you are talking about, the only way to be sure is to install a 2012 instance, copy the database, and test your queries and sp's against the new instance.
"Five fruits and vegetables a day? What a joke!
Personally, after the third watermelon, I'm full."
|
|
|
|
|
Yeah your right, give it a test spin, instead of trusting someones word on this. Good call Phil.
I'll call the computer company that created my remote DEV environment and have them ass that. The DB is 26 gigs and it would takes days to get it from a remote machine.
If it ain't broke don't fix it
Discover my world at jkirkerx.com
|
|
|
|
|
Well, if you know precisely which datetime fields caused you troubles, you don't need 26 Gb of data.
Having migrated a bunch of servers from MSSQL 2008 to MSSQL 2012, I don't remember having to modify any table, sp or query for it to just work. But, after all, I don't know anything about this database of yours, so these are just my 2 cents.
"Five fruits and vegetables a day? What a joke!
Personally, after the third watermelon, I'm full."
|
|
|
|
|
Your right, if the data is stored the same, then it's just a matter of code adjustments, in which I have already made.
If it ain't broke don't fix it
Discover my world at jkirkerx.com
|
|
|
|
|
When you say "convert your dates again" - why are you using strings for dates - surely just casting as a Date would be better?
|
|
|
|
|
I'm working on a project written by 3 Chinese kids from China that were here at UC Irvine to study back in 2000 written in PHP over the course of 8 years. They made some bad choices in database design and I'm not about to change the database since I don't have a full understanding of how the program works. Well I do now after rewriting the PHP since Feb 2021. These kids had disrespect for HTML as well, and the worst programming disciplines I have ever seen.
In PHP 7.4, converting the date to a ISO formatted string speed ed up the process of converting that date into a PHP date object for my Calculation.Factory.PHP to process formulas, which generates the cost of an activity or specific job in the construction industry. And for some reason, technical, writing a PHP date back to SQL server required a different date conversion in SQL.
What was most frustrating was reading a date in SQL, and writing it back to another table in the same format, and SQL server would not write it unless it was in a certain ISO format.
The main point of this project was to get the existing code re imagined and upgraded from PHP 4.2 to PHP 7.4+ to extend the life of the application another 20 years.
I know why the dates had to be converted but I don't know how to work around this without altering the database design at this point in time. Excellent question which is making think about the dates again.
The original SQL did cast the date, but I can't remember at the moment why I had to remove the CAST, that was 8 months ago.
If it ain't broke don't fix it
Discover my world at jkirkerx.com
|
|
|
|
|
Hey!!!
Error:
Fatal error: Uncaught Error: Call to a member function fetch_array() on bool
Code:
```
<?php
include('db_connect.php');
session_start();
if(isset($_GET['id'])){
$username = $conn->query("SELECT username FROM users where id =".$_GET['id']);
foreach($username->fetch_array() as $k =>$v){
$meta[$k] = $v;
}
}
?>
Have been wrecking my brain for some days to figure out how to correct this. Can anyone help with rewriting this so it would work properly?
Thank ya!!!
|
|
|
|
|
Your code is vulnerable to SQL Injection[^]. NEVER use string concatenation to build a SQL query. ALWAYS use a parameterized query.
PHP: SQL Injection - Manual[^]
PHP: Prepared statements and stored procedures - Manual[^]
Beyond that, the error suggests that your query didn't work. When the query fails, it returns false rather than a result set, as described in the documentation[^].
There are many possible reasons your query might fail. You will need to debug your code to find out what the problem is and fix it. We can't do that for you.
"These people looked deep within my soul and assigned me a number based on the order in which I joined."
- Homer
|
|
|
|
|
Thank ya for the insight I greatly appreciate it
|
|
|
|
|