Jump to content

lopes_andre

Members
  • Posts

    167
  • Joined

  • Last visited

    Never

Everything posted by lopes_andre

  1. Hi, Thanks again for your reply. I have tested but is not matching anything with the regular expression. I have debuged the script, but I'am confused. Why I have 2 results for this pattern? Here is an image of the debuger: Best Regards. André.
  2. Hi, Thanks for your reply. I don't have explain well, sorry. I need to match the numbers between and add those number to an array. The number does not have 6 figure, could have 3, 4, 5, 6, 7 or more. This is possible? Best Regards, André.
  3. Hi, I have been searching for regular expressions documentation but after 2h I don't have a clue how to match this... <a href="announce.asp?REF=570637"> Ok, I need to match the number after REF= and before "> It is possible to define a patter to match this? Best Regards, Andre.
  4. Hi, When we send an email to a current customer(registred), we send the email to the email he have used in the registration. When we send email to a non registred customers we will confirm before send if the email is on the list of registred customers. If not we will send the e-mail with a link to autologon to a guest account. This is possible? There is "the best way" of doing this? Best Regards, André.
  5. Hi, I need to use a function in a mailing list that does the following: 1 - When the current customer of the shop clicks in the given link in the newsletter, the customer autologon. 2 - For non customers yet, when a non customer clicks in the given link in the newsletter, the customer will autologon in a guest account. PS: I'am using OsCommerce, but php programming is php programming... The question: What should I use to star designing one function to do this? Best Regards, Andre.
  6. Hi, I have solved in this way, (case when (T1.LIQUIDO - T2.LIQUIDO) = 0 then null else ((T2.LIQUIDO*100)/T1.LIQUIDO)-100 end) as DIF_PERCENTUAL Best Regards.
  7. Hi, Thanks for your answer!! It works, but when there is 0% of difference gives me an error of division by zero. What solution should I implement to correct this? Best Regards, André.
  8. They are in the same row of different sub-querys. Thanks
  9. Hi, I need to do an Arithmetic operation in a query, but I don't know if it is possible to to this. I want to calculate the difference in % of two rows... For that I need to make 2 calculations: Salary June: 3555 Salary July: 3950 3950 - 3555 = 395 <-- Diference between the two months in value 3950/395 = 10 % <-- Diference between the tho months in % My question. It is possible to do this two operation in a query? Something like: Select (sal_july - sal_june = $X sal_july / $X = DIF_SAL ) as VAR_SAL from sal I Don't know if I have explained well, but I need to do two basic arithmetic operation in ( ( .... ) as FIELD_NAME ). This is possible??
  10. Hi, I need to do an unsubcribe link to an newsletter in PHP/MySQL, but I don't know how to start... The table: id | email | subscription ---------------------------------- 1 | exmp1@mail.com | Y 2 | exmp2@mail.com | N 3 | exmp3@mail.com | N Y is for receive newsletter N is when don't want to receive newsletter(unsubscribe) The question... wich is the better way to put an link on email to the when the customer click on the link he unsubscribe the newsletter? Best Regards, André.
  11. Hi, Thanks for your reply. I don't explain me well. The email field is "unique", but I need to import data to this database and I know that some emails that I will import are duplicated, but because the field email is "unique" I think the import will stop with an error every time that one duplicate email is inserted(or tried to insert). What I need to know is... there is some way do to this: "if email allready in database, ignore that email and continue importing". There is a way to do this, some mysql function? Best Regards, André.
  12. Hi, I need to insert to my email database new emails in CSV format, but I don't want to import duplicate emails. Table Scheme: id | email (unique) | name --------------------------- 1 | expl1@mail.com | expl1 2 | expl2@mail.com | expl2 3 | expl3@mail.com | expl3 4 | expl4@mail.com | expl4 How can I import to this database new emails without insert duplicate emails? The function LOAD DATA INFILE can do this, avoiding to insert duplicate emails in the UNIQUE field "email"? Best Regards, André.
  13. Hi rhodesa, I have not yet tested the code. But thanks a lot! My english is bad, but I was try to apply the word "loop" to this: 1º time, show id=1 2º time, show id=2 3º time, show id=3 4º time, show id=1 5º time, show id=2 I have only 3 names in the database and i want to loop forever. Best regards, André.
  14. Hi, The script must be global. If I run the script I get the name of id1, if another person run the script, that person will get the id2 name. The counter will do this counting "OLD.id + 1" each time the php script runs. How can I start? There are some examples on how to do this loops using php and mysql?
  15. TABLE_NAMES id | Name ---------- 1 | Peter 2 | John 3 | Maria TABLE_COUNTER counter 1 I'am trying to make a loop for each time I run the "show_me_the_name.php" the script shows me a name, using two tables "TABLE_NAMES" and "TABLE_COUNTER" For example: On the first time I run the php script shows "Peter"; Second time, "John"; 3º time, "Maria"; 4º time, "Peter"; 5º time, "John"; How can I start for get this done?
×
×
  • 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.