Jump to content

ameliabob

Members
  • Posts

    218
  • Joined

  • Last visited

Everything posted by ameliabob

  1. ameliabob

    mysql_error

    To repeat the question "once I get the error condition it doesn't seem to get reset. My code is as follows: $qry = "INSERT INTO hamlog (QSLnumber,QSLdate,QSLtime,Cardsent,Cardrcvd,CallSign,Band,RSsent,RSrcvd,Comments) VALUES ('"; $qry .= $QSLnumber."','".$QSLdate."','".$QSLtime."','".$QSLsent."','".$QSLrcvd."','".$callSign."','".$band."','".$rsIn."','".$rsOut."','".$comment."')"; if($QSLnumber!=0){ if(strlen(trim($callSign))>0){ mysql_query($qry);# or die ("Failure in Upload of ".$fName." with qry - ".$qry." from file ".$fName." ".mysql_error().", error number ".mysql_errno()); if(mysql_errno()==1062){ // The test for a duplicate caused by using unique in db creation Show("dup of ".$QSLnumber." in file ".$fName); } else if (mysql_error()!=0){ die ("Failure in Upload of ".$fName." with qry - ".$qry." from file ".$fName." ".mysql_error()); } }
  2. ameliabob

    mysql_error

    In reading the manual I saw that mysql_error was reset after every call to mysql.When I give the commandmysql_query($qry);if(mysql_error=='1062') // Looking for dupsecho ("dup found");After the first one is found every record after that shows the error. Doesn't the mysql_query reset the error condition or must I force it somehow?Thanks
  3. ameliabob

    FTP downloads

    That was way too much information in way to few lines. I am loooking for a snippet of code resident on the server that would prepare a file and send it to the user. The user would only be sending a request to the server to prepare and send it. Any place where I can find such code?
  4. ameliabob

    FTP downloads

    I am just starting to use FTP to get files from the server to the user. In what I am reading it is saying that I need to connect to the server. but I am the server and just sending a file. What am I missing here? thanks
  5. Ok, as someone said, one question leads to another. I am using the wamp server and Apache, so what is the setting called? So I can go and look for it. And/or how do I know what setting it is being run at. Am I allowed to see that?
  6. ameliabob

    chown -- useage

    I have downloaded a file from a service and saved it. I want to use it and then delete it. I have found that the download is done through the adminstrator privilege and I am using at as a normal person who has all priveleges. unlink won't let me delete (and I guess correctly as I didn't create it)chown won't let me change ownership to me. I guess there is something in the C/C++ language that I am missing. Where do I look from here?
  7. Thanks, Exactly what I was looking for.
  8. I have been using $_REQUEST to get the various parts of a url. Is there a command to allow me to see the entire url before processing any of it?
  9. This is the query SELECT title,type,lastused, location FROM songs, seasonref WHERE seasonref.seasonID = ' ".$seasonNo." ' AND seasonref.songID = songs.P_id ORDER BY title When I referred to the 1st and second it was more to the pieces of the queery. the first piece is between the WHERE and the AND. The second piece is after the AND. $seasonNo is defined as a single changeable value that is set before the query.
  10. ameliabob

    Multiple Queries

    I am trying to do a query on a table and also do a join. I am not sure how to go about doing this. My original query looked like this: $qry = "SELECT title,type,lastused, location FROM songs, seasonref WHERE seasonref.seasonID = ' ".$seasonNo." ' AND seasonref.songID = songs.P_id ORDER BY title" What I am trying to do is the first part of the WHERE is a query that selects a series of pointers (songID) that is used in the second part after the AND. The structure of the seasonref table isseasonID intsongID int the songs table hasP_id inttitle varchar(40)type varchar(10)etc. Would I be better having the output of the first query feed into the second? If so how do I do this? ThanksBob
  11. When I designed a query that looks like this: SELECT * FROM songs WHERE number BETWEEN '1' AND '4' OR number BETWEEN '20' AND '30' AND number BETWEEN '100' AND '110' ORDER BY 'title' ASC title is a field in the songs table. This does not come out sorted the way I wanted. It almost appears to be in the order that the items were put in the table. Do I have to group all of the where conditions? Thanks
×
×
  • Create New...