Search found 6 matches

by nevermiss9
Thu Apr 08, 2004 8:03 am
Forum: PHP - Code
Topic: Read from txt file and update or insert datas to database???
Replies: 6
Views: 373

thanks for your help guys but i found out the problem i had to use mysql_num_rows to beable to do what i want.. here is my fix to the solution... $result=mysql_query("SELECT fld_barcode FROM tbl_products WHERE fld_barcode='$barcode'"); $norows=mysql_num_rows($result); if ($norows>0) { mysq...
by nevermiss9
Thu Apr 08, 2004 5:38 am
Forum: PHP - Code
Topic: Read from txt file and update or insert datas to database???
Replies: 6
Views: 373

ok what i'm trying do is write a script to update the database. by fld_barcode Unique field. varchar(25) fld_barcode will have mix letters n numbers sometimes only letters or numbers. basical i'm writting a script to update the price and name by searching barcode. if barcode doesn't exit insert it i...
by nevermiss9
Thu Apr 08, 2004 5:26 am
Forum: PHP - Code
Topic: Read from txt file and update or insert datas to database???
Replies: 6
Views: 373

that didn't help. even if change that line of code to yours if (mysql_query("SELECT fld_barcode FROM tbl_products WHERE fld_barcode='$barcode' ")) the problem is even if there is no data in the database at all for it to look up and check if barcode exit. it always does update. when i put '...
by nevermiss9
Thu Apr 08, 2004 1:46 am
Forum: PHP - Code
Topic: Read from txt file and update or insert datas to database???
Replies: 6
Views: 373

Read from txt file and update or insert datas to database???

Hey guyz, I'm still new to this so take it easy on me.. Ok here is my problem.. here is my code below <?php //testing read csv file and sorting it out. $filename = "test.txt"; dbproducts(); if (!($fp = fopen($filename,"r"))) exit("Unable to open $filename."); while (!fe...
by nevermiss9
Thu Mar 25, 2004 3:52 pm
Forum: Databases
Topic: display data from 2 tables.
Replies: 2
Views: 370

thanks you.
that was all i needed to make it work.
by nevermiss9
Thu Mar 25, 2004 9:21 am
Forum: Databases
Topic: display data from 2 tables.
Replies: 2
Views: 370

display data from 2 tables.

I'm new too php. ok here is my problem when i do a sql query i get the right data display on the screen. but when i use the sql in php code for some reason it doesn't display the corrected data I needed. i cannot use tbl_products.fld_name(tablename n fieldname together) to point to that field in tha...