Jump to content

dev1902

Members
  • Posts

    18
  • Joined

  • Last visited

dev1902's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. I have 3 pages. I am concerned with the first and second page. Basically, The first page populates two text fields with the same data straight from a database. >>You have an option to compare two things. >>When you click submit >>The information requested is displayed on page 2 in a table with different columns displaying specific information. Some of the listed items in the text field on page 1 does not have information to display on the table. My goal is to write a simple php code to say "There is no information currently available for this item" on page 2 when you select an item with no information to display on the table on page 2. I want only the text to display and not the table. Where would I have to place the code for that to happen and what type of code do you suggest I use? Thanks in advance
  2. Thanks a lot guys. My client seems to be fine preg_replace. I will look into it more though. Thanks again.
  3. Thanks again. I figured it out.
  4. They're over 25k and some of them only have 1 _ and some have more/less numbers . Example : 15607_249 or 357_C679_50984
  5. I know, but with the script I already had, that was really the best choice. It runs well for what me. It was extremely easy to write : preg_replace("/_[0-9]{0,5}$/", "",$Id);
  6. Thanks, I actually ended up using preg_replace as it was easier than the methods you suggested. Thank you though.
  7. Hello guys, i'm trying to separate something like this: 15969_D55T_000 this: 3105_C55_00148 and this : 15969_D55T_00 using php. I have a few letter and number combination like these in a database that i already access. I was wondering how i would be able to just make it 15969_D55T, 3105_C55. I want help with a general php code that will help me to get ride of the extra "_xxx or _xx or _xxxx" after "xxxx_xxx" As i said before, All this information is on a database that I access. Thank you Very Much.
  8. is there a way to do it using an IF statement?
  9. I know. I was saying, what if i populated a text field with those names on one page, and the i submit that specific name(s) and it displays all the related infromation with that name(s) on another page.
  10. Hello, Can someone help me to come up with a condition for an input to filter out a large table to a smaller table with a code. > My files are already uploaded to my db(database) and I already I already created a code to display the information in a table. > To clarify what i need help with, I populated a text field with information from my db and then when i submit it, it will filter the large table and only include any information that has to do with the information that i submitted. >> To further clarify, here is an example : There is a db with usernames, and I populated a text field with all the user ids. >> When i select the user id and click 'submit', all the information on that specific user id is pulled up and displayed on another page. --> but there is also an option to display two user ids at the same time. I know how to do it individually like this: <?php $query = mysql_query("SELECT * FROM `gfr` WHERE numInter > 0 AND geneSymbolTranscript1 = 'ERG'"); ?> but, i want to be able to do it for two columns and all their rows. Thanks in advance.
  11. Thanks for the advice, but i fixed my problems the same day i posted this.
  12. Hello, I working on my code to populate a text field from a column of data in a mysql database and i was successful. -- I don't know if this is the best code to do so. Check it out!! <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="content-type" content="text/html;charset=utf-8" /> <meta name="generator" content="Adobe GoLive" /> <title>Test site</title> </head> <body> <form action="index.php" method="post" name="sampleDetail" target="_self" class="container" AUTOCOMPLETE="off"> <label for="sampleID">Gene 1: </label> <input type="text" name='sampleID' id='sampleID' list="samp"> <br><br> <datalist id="samp"> <?php $connect = mysql_connect("localhost", "root", ""); mysql_select_db("csv_db"); $query = mysql_query("SELECT * FROM `gene_name` ORDER BY `gene_name`.`COL 2` ASC LIMIT 2, 6970"); WHILE ($rows = mysql_fetch_array($query)): $Column_2 = $rows['COL 2']; echo "<option value=$Column_2>$Column_2</option> <br>"; endwhile; ?> </datalist> <label for="sampleID">Gene 2: </label> <input type="text" name='sampleID' id='sampleID' list="samp"> <br><br> <datalist id="samp"> <?php $connect = mysql_connect("localhost", "root", ""); mysql_select_db("csv_db"); $query = mysql_query("SELECT * FROM `gene_name` ORDER BY `gene_name`.`COL 2` ASC LIMIT 2, 6960 "); WHILE ($rows = mysql_fetch_array($query)): $Column_2 = $rows['COL 2']; echo "<option value=$Column_2>$Column_2</option> <br>"; endwhile; ?> </datalist> <input type="button" value="Submit"> </form> </body> </html> Do have any suggestions? I also want to make sure i can type in the same gene with different. This is how it would look in the row: c15of1v | B10of1d | R12of1g -- All three names are listed in the same row. I want to be able to type in either of those names and get the same gene. Is that possible?
  13. OK, i have a .csv excel file that has a lot of data. I am working with the human genome. I am creating a web database to store information on over 25,000 genes. All the information is in the the .csv file, and i need help with a php code to access a specific column in the file to populate a text field.
  14. Hello, can someone help me with a code to access a specific column in my .csv excel file to populate a text filed?
  15. Thanks a lot guys. - I will look more into modifying my code for it to read the files. - I will look into the database upload also. - What i am working on is a web database to store information on the human genome. - The codes i run takes the information from the files in my directory and displays the infromation in categories and tables on two other pages.
×
×
  • 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.