Click here to Skip to main content
15,890,946 members
Home / Discussions / JavaScript
   

JavaScript

 
GeneralRe: Call to Member function execute() on null... Pin
samflex27-Feb-17 8:09
samflex27-Feb-17 8:09 
GeneralRe: Call to Member function execute() on null... Pin
samflex27-Feb-17 11:44
samflex27-Feb-17 11:44 
GeneralRe: Call to Member function execute() on null... Pin
Richard MacCutchan27-Feb-17 21:28
mveRichard MacCutchan27-Feb-17 21:28 
GeneralRe: Call to Member function execute() on null... Pin
Richard Deeming28-Feb-17 1:09
mveRichard Deeming28-Feb-17 1:09 
GeneralRe: Call to Member function execute() on null... Pin
samflex28-Feb-17 1:23
samflex28-Feb-17 1:23 
GeneralRe: Call to Member function execute() on null... Pin
Richard Deeming28-Feb-17 1:40
mveRichard Deeming28-Feb-17 1:40 
GeneralRe: Call to Member function execute() on null... Pin
samflex28-Feb-17 3:30
samflex28-Feb-17 3:30 
GeneralRe: Call to Member function execute() on null... Pin
Richard Deeming28-Feb-17 3:39
mveRichard Deeming28-Feb-17 3:39 
Personally, I'd be inclined to split them into multiple tables - "employee details", "source details", and "spouse details". You'd have a one-to-many relationship from the employee details table to the source details table, and another from the employee details table to the spouse details table.

To display the full details, you'd then have three queries: one to get the employee details; one to get the list of source details; and one to get the list of spouse details.
SQL
-- Employee details:
SELECT `employeename`, `ttitle`, `email` FROM `myDB`.`wp_employeeDetails` WHERE `employeeID` = ?

-- Source details:
SELECT `sourcename`, `sourceaddress`, `income` FROM `myDB`.`wp_sourceDetails` WHERE `employeeID` = ?

-- Spouse details:
SELECT `spousename`, `spouseAddress`, `spouseincome` FROM `myDB`.`wp_spouseDetails` WHERE `employeeID` = ?


You could do that with your current design, but you'd need some way to identify whether a record was the employee details, the source details, or the spouse details. It could get quite messy. Smile | :)
SQL
-- Employee details:
SELECT `employeename`, `ttitle`, `email` FROM `myDB`.`wp_myTable` WHERE `employeeID` = ? AND `employeename` Is Not Null

-- Source details:
SELECT `sourcename`, `sourceaddress`, `income` FROM `myDB`.`wp_myTable` WHERE `employeeID` = ? AND `sourcename` Is Not Null

-- Spouse details:
SELECT `spousename`, `spouseAddress`, `spouseincome` FROM `myDB`.`wp_myTable` WHERE `employeeID` = ? AND `spousename` Is Not Null




"These people looked deep within my soul and assigned me a number based on the order in which I joined."
- Homer


GeneralRe: Call to Member function execute() on null... Pin
samflex28-Feb-17 4:00
samflex28-Feb-17 4:00 
GeneralRe: Call to Member function execute() on null... Pin
Richard Deeming28-Feb-17 4:11
mveRichard Deeming28-Feb-17 4:11 
GeneralRe: Call to Member function execute() on null... Pin
samflex28-Feb-17 4:28
samflex28-Feb-17 4:28 
GeneralRe: Call to Member function execute() on null... Pin
Richard Deeming28-Feb-17 4:32
mveRichard Deeming28-Feb-17 4:32 
GeneralRe: Call to Member function execute() on null... Pin
samflex28-Feb-17 5:38
samflex28-Feb-17 5:38 
QuestionGetting "Notice: Undefined offset: 1" error (SOLVED) Pin
samflex21-Feb-17 6:12
samflex21-Feb-17 6:12 
AnswerRe: Getting "Notice: Undefined offset: 1" error Pin
Richard Deeming21-Feb-17 8:37
mveRichard Deeming21-Feb-17 8:37 
GeneralRe: Getting "Notice: Undefined offset: 1" error Pin
samflex21-Feb-17 8:46
samflex21-Feb-17 8:46 
GeneralRe: Getting "Notice: Undefined offset: 1" error Pin
Richard Deeming21-Feb-17 9:03
mveRichard Deeming21-Feb-17 9:03 
GeneralRe: Getting "Notice: Undefined offset: 1" error Pin
samflex21-Feb-17 9:12
samflex21-Feb-17 9:12 
GeneralRe: Getting "Notice: Undefined offset: 1" error Pin
Richard Deeming21-Feb-17 9:22
mveRichard Deeming21-Feb-17 9:22 
GeneralRe: Getting "Notice: Undefined offset: 1" error Pin
samflex21-Feb-17 9:34
samflex21-Feb-17 9:34 
GeneralRe: Getting "Notice: Undefined offset: 1" error Pin
Richard Deeming21-Feb-17 9:37
mveRichard Deeming21-Feb-17 9:37 
GeneralRe: Getting "Notice: Undefined offset: 1" error Pin
samflex21-Feb-17 10:04
samflex21-Feb-17 10:04 
GeneralRe: Getting "Notice: Undefined offset: 1" error Pin
Richard Deeming21-Feb-17 11:06
mveRichard Deeming21-Feb-17 11:06 
GeneralRe: Getting "Notice: Undefined offset: 1" error Pin
samflex21-Feb-17 15:34
samflex21-Feb-17 15:34 
GeneralRe: Getting "Notice: Undefined offset: 1" error Pin
Richard Deeming22-Feb-17 2:41
mveRichard Deeming22-Feb-17 2:41 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.