Jump to content

adrianle

Members
  • Posts

    59
  • Joined

  • Last visited

Profile Information

  • Gender
    Not Telling

adrianle's Achievements

Member

Member (2/5)

0

Reputation

  1. Hey y'all.. need some definite help here. I have two tables, one for Parents, and one for Children. There may be multiple Children for any given Parent, and they're both related in their tables via a unique FamilyID. I need to pull each Parent record, and ALL related Children records into a recordset. Ex. Parent Bill has two kids, Jimmy & Tommy. Parent Dave has one kid, Molly. I need to retrieve a recordset that looks like this: Bill, Jimmy, Tommy Dave, Molly Obviously, one of the challenges is that the different number of Children that will be output - though I'm fine with retrieving multiple children info into a single column. Suggestions?
  2. It says: /etc/php.ini ... which is where I put it.
  3. Hey guys.. I've got a few entries in a php.ini file that don't appear to be taking hold after restarting apache. Here's the scenario: Wrote an info.php to show me my PHP configuration. It says it's looking for php.ini under .../webroot/etc/php.ini I changed that php.ini - restarted Apache Ran the info.php again, and I don't see the new values reflected here. Suggestions?
  4. I've got a stinker of a question and it's driving me crazy. I have a table showing a list of contacts, and in some cases, more than one Contact work for the same Company (a unique ID is held in this table for the relative Company). I need to somehow return a list of rows showing me all instances of A) the Company ID, and B) the number of contacts for that Company Help??
  5. The time value is coming from a TIME column type in the table, so the example mysql> SELECT TIME_TO_SEC('00:05:30'); doesn't help much I'm afraid. I've tried to use this function with the column name plugged into the select statement but without success. To answer Anemic's question.. that would require having to calculate out the time slice into seconds before entering it into the table. The point of this exercise is to have PHP calculate the total number of seconds for us!
  6. I've got a mysql table where I want to enter some amount of time, say 5 minutes (5:00) into a column, which will then be pulled by a page and a calculation done (5 minutes x 60 seconds = 300 seconds). I'm unsure what type of mysql field type I should use to hold this data. Any ideas?
  7. ..and I mean that in a literal sense! I have a mySQL table with Parent information in it. I also have a table with Child information in it, each with a unique ID related to one of the records in the Parent table. Some Parents have multiple Children. I need to run a select statement that will return ALL family records, ideally with the parent first, and then their children, and so on. Suggestions? I posted this question on a mysql forum and got no replies.
  8. I'm currently pulling database content into a page that will be printed. This page has a footer div with client logo, etc. I need to figure out how to split the content after X number of lines so it will print onto the next page without running over the footer div. Help??
  9. My client wants me to create a process, where he can click to send an email to someone, and embedded in that HTML email will be a link that when clicked, will take the user to a "details" page showing their unique information. We don't want the UniqueID to be visible in the link, as the user might decide to type a different ID into that URL and see someone else's details. So.. how do we link (from an email or other outside source) to a dynamically populated page, without showing the unique ID? Thx
  10. Yeah this worked well, thanks so much for the guidance!
  11. So here's the challenge.. I'm looping through the list of all categories on the page as well. I want to build the conditional statement that says "if the member_id is NOT null, show the link", except that even in your example, there are TWO instances where the membe_id is not null. So how do I write my conditional statement so that it takes into consideration HOWEVER MANY different committee instances there may be? Right now, the conditional statement ONLY looks at the "first" committee ID that comes through.
  12. I've got what feels like a complex issue with what I'm sure for you experienced folks would seem simple, but I'm having trouble wrapping my head around it. -I have a query that retrieves a general list of committees, each with a uniqueID -I have a query retrieving records from another table where the records match the user ID, currently stored in a session variable (from a previous login process) and the uniqueID for the committees they serve on. I have a WHILE loop populating the page with the committees. Works fine. I have a link (potentially) next to the committee name, pointing to another page with protected committee data, which should only be visible to members of that committee. What I *need* to do is having a conditional statement of some sort that only displays that link to the protected page IF the user is a member of that specific committee. Basically, IF they're on the committee, they see the link.. if they're NOT on that committee, they see nothing next to the committee name. How would one of you wonderful people write that?
  13. The solution was to change WA_DEFAULT to WA_IGNORE so that the field would be ignored in the update process if empty.
  14. I'm using some PHP file upload code that I've used without problems with old mySQL. When I use this same functionality with mySQLi and upload a new file, the filename INSERTs into the DB just fine with the value from the "file" field. When I try to UPDATE the same record however, all other text fields update fine, but the "file" type field winds up clearing that column for that record. Almost like the field (which has been set to take the equivelent value from a recordset) is ignored, or not populated, or something. Does anyone know if there's an issue with "file" type fields and mySQLi? I wouldn't think so.. here's my Update code: <?php if (isset($_POST["button"]) || isset($_POST["button_x"])) { $UpdateQuery = new WA_MySQLi_Query($Conn); $UpdateQuery->Action = "update"; $UpdateQuery->Table = "TableName"; $UpdateQuery->bindColumn("FileName", "s", "".((isset($_FILES["fileField"]))?$_FILES["fileField"]["name"]:"") ."", "WA_DEFAULT"); $UpdateQuery->addFilter("DocID", "=", "i", "".($_GET['DocID']) .""); $UpdateQuery->execute(); } ?
  15. So I'm requesting a set of records from the DB via mysqli... and I get two rows returned, each with a particular committee ID. I have PHP on my page saying essentially: <?php if($TableName->getColumnVal("CommitteeID") == 1 ) { ?> SHow some data here <?php } ?> In this case, the records I get back include committee IDs 31, and 1. Because the row where the ID is 31 occurs in the table BEFORE the row where ID is 1, then the statement fails! What do I need to do so that this statement will be honored, regardless of how many rows are retrieved, or where in the order of the rows this statement is true?? Thanks all...
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.