Jump to content

gjwolf

New Members
  • Posts

    4
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

gjwolf's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. Fenway, I really appreciate you giving me the tips.. it worked thanks a bunch! G
  2. Fenway,  can you show me what you mean? thanks,
  3. Hi fenway I'm searching for what you said but how would I do that ? G
  4. I'm having a problem trying to get my sql query to exectute correctly with Php I can show you what works in phpadmin and what I want to do to make it clearer to articulate. The following query works good for me in phpmyadmin but when I try to substitue the serach string in php it doesn't work no matter what I try.  I know its tricky because of my field name has the backspace in it and using special characters and I tried.. any help appreciated on what xxxxx should be would be very helpful. here is the query that works SELECT * FROM `bw` WHERE int_name like ('sfd-br01-tps-Serial0\/%:0\(%') which returns what I want sfd-br01-tps-Serial0/0:0(In)  sfd-br01-tps-Serial0/0:0(Out) sfd-br01-tps-Serial0/1:0(In) sfd-br01-tps-Serial0/1:0(Out) sfd-br01-tps-Serial0/2:0(In) sfd-br01-tps-Serial0/2:0(Out) the problem I'm having is on how to put this in php and make it work correctly as a variable in my array.  No matter what I try I cannot get it to work any help appreciated.  Here is my loop and code  I put xxxx for the variable as whatever I have tried doesn't work. $hosts = array('xxxxx'); // Loop through each element in the array foreach ($hosts as $host_str){ // Request the text of all records that meet this criteria $query = "SELECT * FROM cpu WHERE name LIKE '$host_str' order by name"; $result = mysql_query($query); if (!$result) {   $message  = 'Invalid query: ' . mysql_error() . "\n";   $message .= 'Whole query: ' . $result;   die($message); } g
×
×
  • 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.