zenag Posted April 28, 2008 Share Posted April 28, 2008 yeah ...its only functions...... Link to comment https://forums.phpfreaks.com/topic/100626-phpmysql/page/2/#findComment-528777 Share on other sites More sharing options...
tuxbuddy Posted April 28, 2008 Author Share Posted April 28, 2008 Cant Get you...Is there any file in that HelpCORE that can help us doing the changes for TIMING. Link to comment https://forums.phpfreaks.com/topic/100626-phpmysql/page/2/#findComment-528778 Share on other sites More sharing options...
zenag Posted April 28, 2008 Share Posted April 28, 2008 actually ....in which page do u need to change timings..i cant open page otherthan index.php Link to comment https://forums.phpfreaks.com/topic/100626-phpmysql/page/2/#findComment-528779 Share on other sites More sharing options...
tuxbuddy Posted April 28, 2008 Author Share Posted April 28, 2008 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 Link to comment https://forums.phpfreaks.com/topic/100626-phpmysql/page/2/#findComment-528781 Share on other sites More sharing options...
zenag Posted April 28, 2008 Share Posted April 28, 2008 now ....im able to logged in ..since ..password is password in encrypted ...i ve removed that... Link to comment https://forums.phpfreaks.com/topic/100626-phpmysql/page/2/#findComment-528787 Share on other sites More sharing options...
tuxbuddy Posted April 28, 2008 Author Share Posted April 28, 2008 Fine...Now when you are logged in try logging as administrator coz yu will see config option at the left end..did yu? Link to comment https://forums.phpfreaks.com/topic/100626-phpmysql/page/2/#findComment-528797 Share on other sites More sharing options...
tuxbuddy Posted April 28, 2008 Author Share Posted April 28, 2008 Did yu get what actually we want related to timing??? Link to comment https://forums.phpfreaks.com/topic/100626-phpmysql/page/2/#findComment-528799 Share on other sites More sharing options...
tuxbuddy Posted April 28, 2008 Author Share Posted April 28, 2008 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. Link to comment https://forums.phpfreaks.com/topic/100626-phpmysql/page/2/#findComment-528804 Share on other sites More sharing options...
zenag Posted April 29, 2008 Share Posted April 29, 2008 yeah...i can see config options at the left end... Link to comment https://forums.phpfreaks.com/topic/100626-phpmysql/page/2/#findComment-529322 Share on other sites More sharing options...
tuxbuddy Posted April 29, 2008 Author Share Posted April 29, 2008 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>              <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 ?? Link to comment https://forums.phpfreaks.com/topic/100626-phpmysql/page/2/#findComment-529354 Share on other sites More sharing options...
zenag Posted April 29, 2008 Share Posted April 29, 2008 yeah ...ive been here just now only....i wl rectify it... Link to comment https://forums.phpfreaks.com/topic/100626-phpmysql/page/2/#findComment-529356 Share on other sites More sharing options...
tuxbuddy Posted April 29, 2008 Author Share Posted April 29, 2008 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... Link to comment https://forums.phpfreaks.com/topic/100626-phpmysql/page/2/#findComment-529360 Share on other sites More sharing options...
zenag Posted April 29, 2008 Share Posted April 29, 2008 hai....just now came from lunch....sorry cant get u...what did the buttons actually need to do... Link to comment https://forums.phpfreaks.com/topic/100626-phpmysql/page/2/#findComment-529370 Share on other sites More sharing options...
tuxbuddy Posted April 29, 2008 Author Share Posted April 29, 2008 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> Link to comment https://forums.phpfreaks.com/topic/100626-phpmysql/page/2/#findComment-529383 Share on other sites More sharing options...
zenag Posted April 29, 2008 Share Posted April 29, 2008 like this?????????????? <? 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 = ""; // 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("test", $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> <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 */ /* 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); } else { if($clicked=="closed") { echo "closed"; } } ?> Link to comment https://forums.phpfreaks.com/topic/100626-phpmysql/page/2/#findComment-529385 Share on other sites More sharing options...
tuxbuddy Posted April 29, 2008 Author Share Posted April 29, 2008 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?? Link to comment https://forums.phpfreaks.com/topic/100626-phpmysql/page/2/#findComment-529390 Share on other sites More sharing options...
zenag Posted April 29, 2008 Share Posted April 29, 2008 yeah im referring that... my contact num is 9791901874. Link to comment https://forums.phpfreaks.com/topic/100626-phpmysql/page/2/#findComment-529395 Share on other sites More sharing options...
zenag Posted April 29, 2008 Share Posted April 29, 2008 u can call me after 3 hours ...ie after 6.30 since i cant attend the call during office timings... Link to comment https://forums.phpfreaks.com/topic/100626-phpmysql/page/2/#findComment-529397 Share on other sites More sharing options...
zenag Posted April 29, 2008 Share Posted April 29, 2008 & whats urs.. Link to comment https://forums.phpfreaks.com/topic/100626-phpmysql/page/2/#findComment-529399 Share on other sites More sharing options...
tuxbuddy Posted April 29, 2008 Author Share Posted April 29, 2008 Mine is 9740535000..where are yu placed exactly...I am in Bglr Link to comment https://forums.phpfreaks.com/topic/100626-phpmysql/page/2/#findComment-529400 Share on other sites More sharing options...
zenag Posted April 29, 2008 Share Posted April 29, 2008 am iin tamilnadu ,coimbatore. Link to comment https://forums.phpfreaks.com/topic/100626-phpmysql/page/2/#findComment-529402 Share on other sites More sharing options...
tuxbuddy Posted April 29, 2008 Author Share Posted April 29, 2008 Something to ask yu...Pls Check ur mail after 3 mins Link to comment https://forums.phpfreaks.com/topic/100626-phpmysql/page/2/#findComment-529404 Share on other sites More sharing options...
tuxbuddy Posted April 29, 2008 Author Share Posted April 29, 2008 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); Link to comment https://forums.phpfreaks.com/topic/100626-phpmysql/page/2/#findComment-529409 Share on other sites More sharing options...
tuxbuddy Posted April 29, 2008 Author Share Posted April 29, 2008 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 Link to comment https://forums.phpfreaks.com/topic/100626-phpmysql/page/2/#findComment-529419 Share on other sites More sharing options...
tuxbuddy Posted April 29, 2008 Author Share Posted April 29, 2008 Regarding the TIming Have you gone thru the line: $secs_incident = ( $ta[3] * 3600 ) + ( $ta[4] * 60 ) + $ta[5]; Can this line help us?? Link to comment https://forums.phpfreaks.com/topic/100626-phpmysql/page/2/#findComment-529497 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.