Jump to content

dev1902

Members
  • Posts

    18
  • Joined

  • Last visited

Everything posted by dev1902

  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.
  16. I am not exactly sure how to do that. I have .gfr (gene fusion report) files. I don't really know how to go about doing that using a database to store them. I am using the XAMPP package with a local server and mysql database but i'm not sure how to go about uploading all 25,000+ files. Can you help me with that?
  17. This is one the the full codes i actually run: <form action="resultsSummary.php" method="post" name="sampleDetail" target="_self" class="container" AUTOCOMPLETE="off"> <form action="resultsSummary.php" method="post" name="sampleDetail" target="_self" class="container" AUTOCOMPLETE="off"> <h1 > <label for="sampleID">Gene 1: </label> <input name='sampleID' id='sampleID' list="gene1"> <datalist id="gene1"> <?php if( is_dir( 'GFR/' ) ) { $dHandle = opendir( "GFR/" ); while( false !== ($entry = readdir($dHandle) ) ) { if( preg_match( "/(.+).gfr$/", $entry, $matches) > 0 ) { $sample = $matches[1]; echo "<option value=$sample>$sample</option>"; } } } ?> </datalist> </h1> <h1 >Gene 2: <label for="genome"></label> <input name="genome" id="genome" list="gene2"> <datalist id="gene2"> <option value="hg18">hg18</option> <option value="hg19">hg19</option> </datalist> <p>Type of fusions <label for="filterType"></label> <select name="filterType" id="filterType"> <option value="all">all</option> <option value="inter">inter-chromosomal</option> <option value="intra">intra-chromosomal</option> <option value="intra_inter">inter- & intra-chromosomal</option> <option value="read-through">read-through</option> </select> </p> <br /> <input type="hidden" value="normal" name="debug"/> <input type="submit" class="button"/> </h1> </form> --My goal is to populate a text form so an autocmplete function will be available. --I have accomplished this, but i'm afraid it will take the code a while to go through the 25,000+ files i have in my directory and populate the text form. --My goal is to find a quicker way for the files to be read directly. --I have some great suggestions above and i will try them. --Do you guys or anyone else have other advice or a php template to achieve my goal? ||!Thanks a lot for reading!!|| --
  18. Hello, right now i'm running a PHP code that looks into a directory and retrieves the files. --Does anyone know a simple, quick and efficientPHP code format to go straight to the files in a directory instead of going through the directory itself? Right now i'm running this code. php code: <?php if( is_dir( 'temp/' ) ) { $dHandle = opendir( "temp/" ); while( false !== ($entry = readdir($dHandle) ) ) { if( preg_match( "/(.+).gfr$/", $entry, $matches) > 0 ) { $sample = $matches[1]; ?> --I need a code to go straight to the files so it could process faster on my web database text form. --FYI, i have over 25,00 files in this folder.
×
×
  • 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.