Jump to content

yanti

Members
  • Posts

    43
  • Joined

  • Last visited

Everything posted by yanti

  1. yanti

    update one rows

    this is current code mysql_query("UPDATE `topik` SET valid='0' WHERE `id`='$_GET[id]'",$con);
  2. yanti

    update one rows

    ok..i display data from database....so now i want to update each rows. so that i can choose which rows i want to update.
  3. hi guys...i want to update specific for one rows not all. any idea?
  4. ok..thanks anyway for ur help...
  5. ok...i had tried the code....but the DELETE THIS option does not appear....so i cant choose which row i want to be unseen....
  6. but, does this means it will remove the data in database? i just want it not to be appear in front end.
  7. my current code is like this... <?php $con = mysql_connect("","",""); if (!$con) { die('Could not connect: ' . mysql_error()); } mysql_select_db("manisfm", $con); $result = mysql_query("SELECT * FROM topik ORDER BY id DESC"); echo "<table border='1'> <tr> <th>ID</th> <th>DATE / TIME</th> <th>SENDER</th> <th>TOPIK HANGAT</th> </tr>"; while($row = mysql_fetch_array($result)) { echo "<tr>"; echo "<td>" . $row['id'] . "</td>"; echo "<td>" . $row['datetime'] . "</td>"; echo "<td>" . $row['sender'] . "</td>"; echo "<td>" . $row['topik'] . "</td>"; echo "</tr>"; } echo "</table>"; mysql_close($con); ?> so where should i put it?
  8. ok....maybe my question got confused..... eg. i display all data from database using column. now, i want to add delete column so that user can delete each row of data so that it wont appear in front end. but, the data still remain in database.
  9. ??? hi guys...just want to ask how am i delete current displayed data without remove it from database. for an example, i have select all data from database to be display. but i want to remove the row of displayed data without delete in database. so that the data will keep remain. any idea guys...
  10. ok...so is there any difference between OCI8 and other version like OCI9? how am i going to setup for windows version?
  11. hi guys...i just want to know if there is any good reference for me to refer working with PHP and oracle. by the way i'm new in this matter. so, i would like a suggestion or idea from you guys. thanks.
  12. hey..thanks everyone...finally...it solved....
  13. hi Mchl... sorry, but where to put that line of code? can u please show me? thanks.
  14. hey guys, now i know why i got the error like that..... because in my csv data there is a value using like this....(Dato') that's why the error appears...coz mysql cant detect it.... am i correct? i think so....
  15. HI deepson2... i tried ur code...it doesnt give any error...but still not insert all rows in csv data. it just entered until row 9....
  16. the error is like this... You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '','','02159002')' at line 1
  17. hi guys...i hv this code which import csv data into mysql....but a little bit problem.....i got an error during runtime saying that MySql syntax error which i cant fix it....hope anyone can help me.... for ur information i got more than 40000 rows of data, but it can insert only 9 rows of it in database then error appear on webpage....] if(isset($_POST['submit'])) { $filename=$_POST['filename']; $handle = fopen("$filename", "r"); while (($data = fgetcsv($handle, 100000, ",")) !== FALSE) { $import="INSERT into kmmb_member1(no_ahli,no_pin,nama,no_ic_baru,no_ic_lama) values('$data[0]','$data[1]','$data[2]','$data[3]','$data[4]')"; mysql_query($import) or die(mysql_error()); } fclose($handle); print "Import done"; } else { print "<form action='import.php' method='post'>"; print "Type file name to import:<br>"; print "<input type='text' name='filename' size='20'><br>"; print "<input type='submit' name='submit' value='submit'></form>"; } ??? ??? :-\
×
×
  • 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.