Jump to content

learningtocode

New Members
  • Posts

    4
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

learningtocode's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. OK, so I could not get the cakePHP or anything WAMP XAMPP etc... to work! I do however now have a prettier display via a grid: ________________________________________________________________________________________________________ <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"> <title>Example 1 PDatagrid</title> <link rel="stylesheet" type="text/css" href="style.css" /> </head> <body> <?php require 'pdatagrid.class.php'; //Establish a database connection require 'dbconfig.php'; $conn = mysql_connect(DB_HOST, DB_USER, DB_PASSWORD) or die('Connection to database failed: ' . mysql_error()); mysql_select_db(DB_NAME) or die ('select_db failed!'); //Initialize instance with database connection $grid = new PDatagrid($conn); //SQL queries to count/select records $grid->setSqlCount("Select count(*) from AES_Events"); $grid->setSqlSelect("SELECT `EventDate` , `EventName` , `Hour` , `EndHour` FROM AES_Events ORDER BY EventDate DESC"); //Base url for navigation links $grid->baselink = 'example1.php'; //Maximum number of page navigation links $grid->setMaxNavLinks(4); //Rows (records) per page $grid->setRowsPerPage(5); //Set current page index if(isset($_GET['page'])) $grid->setPage($_GET['page']); ?> <table cellspacing="0" cellpadding="0" width="500"> <thead> <tr> <td width="20%">Date</td> <td width="40%">Event Name</td> <td width="20%">Start</td> <td width="20%">End</td> </tr> </thead> <tfoot> <tr> <td colspan="3"> <span id="navlinks"><?php echo $grid->getLinks();?></span> </td> </tr> </tfoot> <tbody> <?php echo $grid->getRows();?> </tbody> </table> </body> </html> _____________________________________________________________________________________________________________ Now what I am not finding, or don't know what to look for is prob more accurate, is how to select that row for further browsing-sending it to the create/edit event form, or view it with the inner join tables etc... I want to store variable $editevent in a column in the events table, call it during the query, and define it with the code to edit the event, but I really don't know. If you can even show a code snippit-I can research the pieces to understand and implement it, I just don't know what the functions to create that function are. Thank you so much!
  2. I don't believe this is super high content: 150 staff 20 managers 2 admin staff 350 clients 2000 events; 40 current 4000 time logs/approved requests for events 5000 requests for events Plus the future of the business. I worked for a big company one time and those numbers were at min X1000 so I am going to assume THATS what high data is? I am going to look at the things you mentioned. I did not go to school for this; I am only good with math and was begged by my friend to help her. This has almost bankrupted her company-because she believed him when he said that this site is what she needs to have the success and networking abilities etc... and used an addition of 5 wordpress blogs to create the site. I have those tables from the umpteen number of databases that created (not a multipage blog but 5 separate additions of wordpress!!) Plus a non viewable interaction from the old flash sites databases.... I extracted the data they needed from the tables and at least have it down to 9 tables of data (two are for populating drop down select menus). I have a very secure login working and bringing you to the login in page per your permission, showing the data, just not displaying the way I want it. ('auth.php') verifies the session and once it does continues the connection to database through ('dataconnect.php') I also have all of my queries to select/inner join/ or insert into from forms into multiple tables where needed I created and have tested through mysql commands as functioning. There is a five page public side too, so they will show up in google after I SEO the site-got that one down pat! I guess to me it seems like I am almost done which is why I hear "start over with this", and don't like it:) I am using Expression Web 4, but it is only easy if you are using asp pages except for the color code, however that will look right regardless of the code as long as the punctuation ((' ') is right. I have not read about asp much and the main part of the over all function of this site is to be one column so it looks good on the iphone too. Thank you for your help-explaining your response is so kind, thank you for doing that-or I never would have understood what he meant by that!
  3. I have looked into "Pre-Fab" Sites etc... There is nothing that does this that I can find that works with tables pre-populated with data. The last guy they hired took them to the cleaners for 30K over the last three years using someone elses work and it does not work properly. I am trying to design this custom in order to make sure they keep the last 3/4 years of their business. I don't know how else to save this info. This guy has the tables so odd that it is going to require some outside the box thinking in order to keep it. Thanks about the {} getting sleepy last night!
  4. This is the view of the events (basic) Can I do the if/else statement to chose font color base of a MySQL Query Result? (see below) And No matter how I have written this, it will not turn into a scrolling table. I want the headers to stay fixed. I also don't want to rely on Java-most of the staff logs in mobile. I will if I have to though! The other thing I am not seeing how to do, but I know is also possible.... having an "edit event" "view positions" buttons. I am thinking it has to do with storing a variable, but how do you make sure the variables code pulls the event singularly from your query using the Event_ID ?? This is my first site outside of an HTML site. This is the raw synopsis: Building a site that has users with profiles & 6 permission levels. Client & various staffing levels; I use php to code the access because it is not so much about being able to query/change the database-its more so I am handling with php. There is a time log, and keeps up with the pay to the staff and what the client owes per their hours. This is the first layer view once logged in as any staffmember (sans the edit event which is reserved for high perm staff) upon clicking "view positions" they need to be able to request the shift (separate table-please correct me if I am wrong-I have all foreign keys in database in place so making this event table should be along the same as all the others but with diff variables/queries etc. So in theory all I have to do is get the grabbing of the ID field and using it down) Here is my code. Why is it not setting the client named in green? <html> <body> <?php require_once('auth.php'); ?> <?php $sql = "SELECT * FROM Events ORDER BY EventDate DESC LIMIT 40"; $sqlRes = mysql_query($sql); $req1 = mysql_num_rows($sqlRes); $colorpick = $sqlRes['BusinessName'];?> <div class="event_view"> <table border="1" cellspacing="2" cellpadding="2" width="100%" height="100%" bgcolor="silver" style="border-collapse:collapse;"> <tr> <th><font face="Arial, Helvetica, sans-serif" color="black">Event Date</font></th> <th><font face="Arial, Helvetica, sans-serif" color="black">Event Name</font></th> <th><font face="Arial, Helvetica, sans-serif" color="black">Start Time</font></th> <th><font face="Arial, Helvetica, sans-serif" color="black">End Time</font></th> <th><font face="Arial, Helvetica, sans-serif" color="black">Client Name</font></th> </tr> <?php $i=0; while ($i < $req1) { $f1=mysql_result($sqlRes,$i,"EventDate"); $f2=mysql_result($sqlRes,$i,"EventName"); $f3=mysql_result($sqlRes,$i,"Hour"); $f4=mysql_result($sqlRes,$i,"EndHour"); $f5=mysql_result($sqlRes,$i,"BusinessName"); ?> <tr> <td><font face="Arial, Helvetica, sans-serif" color="black"><?php echo $f1; ?></font></td> <td><font face="Arial, Helvetica, sans-serif" color="black"><?php echo $f2; ?></font></td> <td><font face="Arial, Helvetica, sans-serif" color="black"><?php echo $f3; ?></font></td> <td><font face="Arial, Helvetica, sans-serif" color="black"><?php echo $f4; ?></font></td> <td><?php if($colorpick == 'ClientA') { ?> <font face="Arial, Helvetica, sans-serif" color="green"><?php echo $f5; ?></font>; <?php } else($colorpick != 'ClientA'); ?> <font face="Arial, Helvetica, sans-serif" color="black"><?php echo $f5; ?></font></td> </tr> <?php $i++; } ?> </table> </div> </body> </html>
×
×
  • 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.