Jump to content

tuxbuddy

Members
  • Posts

    103
  • Joined

  • Last visited

    Never

Everything posted by tuxbuddy

  1. Sorry Forgot to change : row to row1 everywhere: while ($row1 = mysql_fetch_array($result3, MYSQL_ASSOC)) { echo "\n"; echo("<tr>\n<td>" . $row1["id"] . "</td>"); echo("<td>" . $row1["description"] . "</td>"); echo("<td>" . $row1["firstname"] . $row["surname"]. "</td>"); echo("<td>" . $row1["loginname"] . "</td></tr>"); But Still its not working...Can yu check code for me?/
  2. See I have made changes...HEre goes the complete COde: <? session_start(); $clicked=$_POST["gender"]; ?><? if($clicked=="open") { ?> <html> <title> Welcome to Project Management Tool</title> <body bgcolor=#AFC7C7> <h1> Report</h1> <?php $myusername = $_SESSION['myusername']; echo $myusername; //put the above right at the top of your script. Everything else can follow ?> <? //header("Content-Type: text/plain"); /* set's the variables for MySQL connection */ $server = "localhost"; // this is the server address and port $username = "root"; // change this to your username $password = "mysql123"; // change this to your password /* Connects to the MySQL server */ $link = @mysql_connect ($server, $username, $password) or die (mysql_error()); /* Defines the Active Database for the Connection */ if (!@mysql_select_db("helpcore", $link)) { echo "<p>There has been an error. This is the error message:</p>"; echo "<p><strong>" . mysql_error() . "</strong></p>"; echo "Please Contact Your Systems Administrator with the details"; } $sql1 = mysql_query("SELECT id from users where loginname ='".$myusername."'",$link); while($row=mysql_fetch_row($sql1 )) { #echo $result[0]; $uid=$row[0]; echo $uid; #$uid=$result["id"]; #echo "$uid"; } #$result2 = mysql_query("SELECT incidents.id, incidents.description, users.firstname, users.surname, users.loginname FROM incidents,users WHERE (incidents.owner_id = users.id) AND (incidents.contact_id = '".$result[0]."')", $link); $result2 = mysql_query("SELECT id, description FROM incidents where contact_id = '".$uid."'", $link); #echo ("SELECT incidents.id, incidents.description, users.firstname, users.surname, users.loginname FROM incidents,users WHERE (incidents.owner_id = users.id) OR (incidents.contact_id = '".$uid."')"; echo $result2 ; #$result2 = mysql_query("SELECT incidents.id,incidents.description,users.firstname,users.surname,users.loginname from incidents,users where (incidents.owner_id = users.id) OR (incidents.contact_id = '".$uid."')", $link); while ($row1=mysql_fetch_row($result2))( $uuid=$row1[0]; echo $uuid; #$result3 = mysql_query("SELECT users.firstname,users.surname,incidents.owner_id FROM incidents,users where (incidents.owner_id = users.id) OR (incidents.owner_id = NULL) $result3 = mysql_query("SELECT users.firstname,users.surname,incidents.owner_id FROM incidents,users where (incidents.owner_id = users.id) OR (incidents.owner_id <'$uuid') OR (incidents.owner_id = NULL)",$link); if (!$result3) { echo("<p>Error performing query: " . mysql_error() . "</p>"); exit(); } /* Starts the table and creates headings */ ?> <table border="1"> <tr> <td><strong>ID</strong></td> <td><strong>Description</strong></td> <td><strong>Owner Name</strong></td> <td><strong>Notes</strong></td> <? /* Retrieves the rows from the query result set and puts them into a HTML table row */ /* Retrieves the rows from the query result set and puts them into a HTML table row */ #echo "hello"; #echo "$myusername"; while ($row = mysql_fetch_array($result3, MYSQL_ASSOC)) { echo "\n"; echo("<tr>\n<td>" . $row["id"] . "</td>"); echo("<td>" . $row["description"] . "</td>"); echo("<td>" . $row["firstname"] . $row["surname"]. "</td>"); echo("<td>" . $row["loginname"] . "</td></tr>"); # echo("<td>" . $row["name"] . "</td>"); # echo("<td>" . $row["create_time"] . "</td>"); } /* Closes the table */ ?> </table> <? /* Closes Connection to the MySQL server */ mysql_close ($link); } else { if($clicked=="closed") { echo "closed"; } } ?> IS it allright??
  3. Regarding the TIming Have you gone thru the line: $secs_incident = ( $ta[3] * 3600 ) + ( $ta[4] * 60 ) + $ta[5]; Can this line help us??
  4. Forget all the above see what I actlly I want to: Here's the new code snippet: [code] $sql1 = mysql_query("SELECT id from users where loginname ='".$myusername."'",$link); In the above code I am storing the value in $sql1..Is it ok? while($row=mysql_fetch_row($sql1 )) { $uid=$row[0]; echo $uid; } $result2 = mysql_query("SELECT id, description FROM incidents where contact_id = '".$uid."'", $link); Now I need again to store this value in some variable and pass query within the output not from database. while ($row1=mysql_fetch_row($result2))( $uuid=$row1[0]; echo $uuid; I know there is some mistake in the below code.Can I take the table structure not from database but from the last result and display it here. [/code] [color=red]$result3 = mysql_query("SELECT users.firstname,users.surname,incidents.owner_id FROM incidents,users where (incidents.owner_id = users.id) OR (incidents.owner_id = NULL)",$link);[/color] I guess it would be like select """""" from <$row1[0] instead. if (!$result3) { echo("<p>Error performing query: " . mysql_error() . "</p>"); exit(); } /* Starts the table and creates headings */ ?> All I want is store the ouput of table and then pass the query to saME TABLE. PLS,HELP
  5. Cool...Before yu check yur mail I will explain you what I need .I have one colum having owner_id which the database says "NULL" . But Everytime I am trying to run query it is not taking NULL value. All attempted doing incident.owner_id = NULL to the query: $result2 = mysql_query("SELECT incidents.id, incidents.description, users.firstname, users.surname, users.loginname FROM incidents,users WHERE (incidents.owner_id = users.id) OR (incidents.owner_id = NULL)AND (incidents.contact_id = '".$uid."')", $link);
  6. Something to ask yu...Pls Check ur mail after 3 mins
  7. Mine is 9740535000..where are yu placed exactly...I am in Bglr
  8. Thanks Man !!! its working..Now I can proceed with the proceedings.One Thing to ask yu - Any update regarding the timing. Yehh...Can I have yur Cntct Number??
  9. Listen !!! I have two radio Button which when clicked should produce output as per instructions. The second file above is : Status.php is all about Open Calls for whch I have written query...In the same way Say: A Hint : if (clickedon = Open) { <.....query> else { if (clickedon = Finished/Closed) { <query>
  10. Pls do the needful once yu are free.Its very important to fix Up.Just write a code for the conditions for two radio buttons ...Thats it...I will write seperate query for close calls...
  11. Dude !! I need ur Help Again regarding the query we discussed. I have this code: FIle : incidents_show.php <html><table width="300" border="0" align="center" cellpadding="0" cellspacing="1" bgcolor="#CCCCCC"> <p> <body bgcolor="#d0d0d0"> <img src="helpcore.jpg" align="center"> </p> <tr> <form name="form1" method="post" action="status.php"> <td> <table width="100%" border="0" cellpadding="3" cellspacing="1" bgcolor="#FFFFFF"> <tr> <td colspan="3"><strong>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp<u>Check your Call Status </u></strong></td> </tr> <tr> <td width="78">Open </td> <td width="6">:</td> <td width="294"> <Input type ='radio' Name ='gender' value='open'> </td> </tr> <tr> <td width="78">Closed</td> <td width="6">:</td> <td width="310"> <Input type ='radio' Name='gender' value='closed'> <tr> <td> </td> <td> </td> <td><input type="submit" name="Submit1" value="Submit"></td> </tr> </table> </td> </form> </tr> </form> </tr> </table> [/html] In the above if I click on any one say "Open " it should display Open Calls.Now I have this code which I thnk work now for only Open...How can I add CLose calls too??? Here the code: FIle: Status.php <html> <title> Welcome to Project Management Tool</title> <body bgcolor=#AFC7C7> <h1> Report</h1> <?php session_start(); $myusername = $_SESSION['myusername']; //put the above right at the top of your script. Everything else can follow ?> <? //header("Content-Type: text/plain"); /* set's the variables for MySQL connection */ $server = "localhost:3306"; // this is the server address and port $username = "root"; // change this to your username $password = "mysql123"; // change this to your password /* Connects to the MySQL server */ $link = @mysql_connect ($server, $username, $password) or die (mysql_error()); /* Defines the Active Database for the Connection */ if (!@mysql_select_db("helpcore", $link)) { echo "<p>There has been an error. This is the error message:</p>"; echo "<p><strong>" . mysql_error() . "</strong></p>"; echo "Please Contact Your Systems Administrator with the details"; } $sql1 = mysql_query("SELECT id from users where loginname ='".$myusername."'",$link); while($row=mysql_fetch_row($sql1 )) { { #echo $result[0]; $uid=$row[0]; echo $uid; #$uid=$result["id"]; #echo "$uid"; } #$result2 = mysql_query("SELECT incidents.id, incidents.description, users.firstname, users.surname, users.loginname FROM incidents,users WHERE (incidents.owner_id = users.id) AND (incidents.contact_id = '".$result[0]."')", $link); $result2 = mysql_query("SELECT incidents.id, incidents.description, users.firstname, users.surname, users.loginname FROM incidents,users where (incidents.owner_id = users.id) OR (incidents.owner_id= NULL) AND (incidents.contact_id = '".$result[0]."')", $link); #echo ("SELECT incidents.id, incidents.description, users.firstname, users.surname, users.loginname FROM incidents,users WHERE (incidents.owner_id = users.id) OR (incidents.contact_id = '".$uid."')"; echo $result2 ; #$result2 = mysql_query("SELECT incidents.id,incidents.description,users.firstname,users.surname,users.loginname from incidents,users where (incidents.owner_id = users.id) OR (incidents.contact_id = '".$uid."')", $link); if (!$result2) { echo("<p>Error performing query: " . mysql_error() . "</p>"); exit(); } /* Starts the table and creates headings */ ?> <table border="1"> <tr> <td><strong>ID</strong></td> <td><strong>Description</strong></td> <td><strong>Owner Name</strong></td> <td><strong>Notes</strong></td> </tr> <? /* Retrieves the rows from the query result set and puts them into a HTML table row */ <td><strong>Description</strong></td> <td><strong>Owner Name</strong></td> <td><strong>Notes</strong></td> </tr> <? /* Retrieves the rows from the query result set and puts them into a HTML table row */ #echo "hello"; #echo "$myusername"; while ($row = mysql_fetch_array($result2, MYSQL_ASSOC)) { echo "\n"; echo("<tr>\n<td>" . $row["id"] . "</td>"); echo("<td>" . $row["description"] . "</td>"); echo("<td>" . $row["firstname"] . $row["surname"]. "</td>"); echo("<td>" . $row["loginname"] . "</td></tr>"); # echo("<td>" . $row["name"] . "</td>"); # echo("<td>" . $row["create_time"] . "</td>"); } /* Closes the table */ ?> </table> <? /* Closes Connection to the MySQL server */ mysql_close ($link); ?> Pls Help me with this ??
  12. I just had a look at /HelpCORE/module_helpcore_secure/incidents_escalate.php and think if it could might be helpful... Actly yu can browse through modules_helpcore_secure directory which I think will sove our issue.
  13. Did yu get what actually we want related to timing???
  14. Fine...Now when you are logged in try logging as administrator coz yu will see config option at the left end..did yu?
  15. Listen !!! The Only HelpCORE directory wont work you need database too...man. If you will notice there is database directory under HelpCORE.There are two file : db_mysql_6.4.sql and db_mysql_6.4_defaults_en.sql Just import them to ur database. And then only you will login properly
  16. Cant Get you...Is there any file in that HelpCORE that can help us doing the changes for TIMING.
  17. Did you check? Any Hint?
  18. No issue.continue with that.I just guess tweakign code with this may help us to solve the issue.Can yu pliz go thru this code.Any hint in this code for changinf the time ...
  19. Good !! Lets talk about the issue ahead.I think you might have copied the folder to your PC.Lemme tel you the issue.In that folder called HelpCORE I have sent yu thru mail,there is one file called time.php.Its path is : /var/www/html/peisd/lib/adodb/tests/time.php /var/www/html/HelpCORE/coreapm/includes/time.php /var/www/html/HelpCORE.bak/coreapm/includes/time.php KIndly go through them if tool is near you or I will send you the same again. Should I The timing issue is : The tool follows 24*7 customer suport kindda stuff but our compant timing is from 10 to 6. If it is 24/7 it will affect SLAs.
  20. Hello Ganesh, I am back again.I was on vacation for 1 week and now Shall we continue with the stuff,if yu r free. Pls Reply
  21. I will check with that...But can you pliz go thru the Helpcore directory I have sent to you. There you will see a file related to timing.That tool is 24*7 but we need to modify it to 9:30 to 6:00 office timing...coz it effects SLA..... Did you installed the tool??
  22. Can yu tell me how gonna I write the code now: Should I try like this: $sql1 = mysql_query("SELECT id from users where loginname ='".$myusername."'",$link); $row = mysql_fetch_row($sql1); echo "$row[0]"; #while($result=mysql_fetch_row($sql1 )) #{ #echo $result; #$uid=$result["id"]; #echo "$uid"; } $result2 = mysql_query("SELECT incidents.id, incidents.description, users.firstname, users.surname, users.loginname FROM incidents,users WHERE (incidents.owner_id = users.id) OR (incidents.contact_id = '".$row[0]."')", $link); But it is not working
  23. Its seems to work now ..It is displaying : 9....That I always wanted..Thanks man..Now i think the incident.contact_id = 9 should work..lemme see
  24. And if I modify it as : $sql1 = mysql_query("SELECT id from users where loginname ='".$myusername."'",$link); echo "$myusername"; echo "$sql1"; while($result=mysql_fetch_row($sql1 )) { echo "$result"; $uid=$result["id"]; echo "$uid"; } Then The output gets displayed: venkatResource id #3Array ID Description Owner Name Notes 17 asdfzsvgfsd Ad.Administrator admin 26 test1 ChandrappaChikkanna chikkannac 13 at Ad.Administrator admin 24 test Ad.Administrator admin
×
×
  • 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.