Jump to content

MySQL Query????


tuxbuddy

Recommended Posts

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

Link to comment
Share on other sites

now assign variable....


$uid=$row[0];
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 = '".$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 ;


if echo $result2 ; displays some resource then query is running ..if not query has some problem...in it..

Link to comment
Share on other sites

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??

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.