Jump to content

techker

Members
  • Posts

    812
  • Joined

  • Last visited

Everything posted by techker

  1. techker

    date format

    ya but my error was to take over somebody else's work and they insert into varchar M-D-Y and there's like already over 400 entries...
  2. techker

    date format

    The field were i store the date
  3. techker

    date format

    Hey guys i insert my date as:01/14/2013 so m-d-y how can i make it so that the mysql recognizes my dates: i got this but it doesnt work.. $today = date('m-d-Y'); $d1 = 'SELECT * FROM '. $row5['Fiscale_Sortie'] .' WHERE DATE(Date_Rempli) = "$today"'; $result8 = mysql_query($d1) or die(mysql_error()); $total_rows8 = mysql_fetch_row($result8);
  4. this worked by the way Change the string terminator from "'" (double-single-double) to '"' (single-double-single), or omit it, since double quote is the default, as I did in my earlier post..
  5. its in my first post comma delimited.thats the only option i have with ms-dos and mac
  6. why would you say that?there is a few csv file formats.. thx for the comment.
  7. ok cool i will see if i can figure it out..thx for the help
  8. so how would i do that?cause it is inserting the correct data?
  9. but its ok the way it is i just need to remove the ""
  10. same 1 260 2441343 "Abatouy Cha" 263 A Actif Actif 1 how can it take this 2441343 Abatouy, Cha 1336 Actif 263 A 1 1.8E+08 i guess the, between the first and last name make it data[1] data [2]
  11. nothing?opened the xls saves as CSV(comma delimited)
  12. there isnt any..odd ah?and i save it as comma delimited..
  13. its odd my csv file 2441343 Abatouy, Ch 1336 Actif 263 A 1 1.8E+08 the query seperates the first and last name from second colum(data[1]) and puts " "abatouy" "ch"
  14. while ($data = fgetcsv($handle,1000,",","'")); odd cause it works it inserts the data correctly but add quotes before and after the data
  15. sorry why do you mean read?i have a form that is used to realy the post.. <?php if (!empty($_GET[success])) { echo "<b>CSV Importer!.</b><br><br>"; } //generic success notice ?> </p> <form action="" method="post" enctype="multipart/form-data" name="form1" id="form1"> Choose your file: <br /> <input name="csv" type="file" id="csv" /> <input name="Year" type="hidden" value="<?=$Fiscale?>" /> <input type="submit" name="Submit" value="Submit" /> </form> csv looks like this 7864804 Abraham Mohamed Masculin 5 ABRM27079607 501
  16. Hey guys im stuck on this code that keeps on putting " " in my tables? i save the xls file to csv comma delimited. when i upload it ,i get "name" "age".... i think it the '".addslashes($data[0])."', if ($_FILES[csv][size] > 0) { //get the csv file $file = $_FILES[csv][tmp_name]; $handle = fopen($file,"r"); //loop through the csv file and insert into database do { if ($data[0]) { mysql_query("INSERT INTO $Year (Ecole,N_Fiche,Nom,Prenom,Code_P,Foyer,Secondaire,Annee,Sortie) VALUES ( '263', '".addslashes($data[0])."', '".addslashes($data[1])."', '".addslashes($data[2])."', '".addslashes($data[5])."', '".addslashes($data[6])."', '".addslashes($data[4])."', '$Year', '".addslashes($data[7])."' ) "); } } while ($data = fgetcsv($handle,1000,",","'")); nice new look by the way.
  17. well ya?it needs to take the id's select search the database and calculate the total amount..?no
  18. Hey guys i have a portal that im doing for invoicing.. i have a page that shows all the unpaid invoices.. i put a check box next in the form...how can i select multiple selection and print the total amount of the selected with the invoice numbers.?? like check box. invoice 2122 total 200$ check box. invoice 2123 total 200$ check box. invoice 2124 total 200$ check box. invoice 2125 total 200$ check box. invoice 2126 total 200$ so the print out would be invoices: 2122-2123-2124-2125-2126 total before tax:1000$
  19. Hey guys no matter what script i upload to my server for file upload and management i get an error 500?i tried to change the chmod to 777 775...i tried them all? think there is a server config file that is blocking this?
  20. i like! the first one you gave me works good.it's exactly what i needed.i want to read up on this abit.thx
  21. wow!impressive.what is the instr called so i can look it up?
  22. Hey guys i have a form that shows the full name of a student. like student : Micheal Jackson i need to search the database for that student. but my tables have first name and last name so the issue i have is i got the full name when in my database i have 2 columns first and last name... so in phpmyadmin i tried the search tab. so i pasted the full name in first and tried LIKE-LIKE%% =.... but nothing worked??
  23. ya..lol looking at this post noticed the code is not the same..i posted an older page..wow this is the autosuggest.php <?php $db = new mysqli('localhost', '2' ,'2', '2'); if(!$db) { echo 'Could not connect to the database.'; } else { if(isset($_POST['queryString'])) { $queryString = $db->real_escape_string($_POST['queryString']); if(strlen($queryString) >0) { $query = $db->query("SELECT Nom,Prenom FROM Etudiant_2013 WHERE Prenom LIKE '$queryString%' LIMIT 10"); if($query) { echo '<ul>'; while ($result = $query ->fetch_object()) { echo '<li onClick="fill(\''.addslashes($result->Nom).'\');">'.$result->Nom.'</li>'; } echo '</ul>'; } else { echo 'OOPS we had a problem '; } } else { // do nothing } } else { echo 'There should be no direct access to this script!'; } } ?>
  24. well im really lost now..it seems all like server code..anyways..thx for the help..
×
×
  • 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.