Jump to content

aebstract

Members
  • Posts

    1,105
  • Joined

  • Last visited

Posts posted by aebstract

  1. 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 'Resource id #3, 1' at line 1

     

    Here is my code atm:

     

    <?php
    mysql_connect("****","****","****") or die(mysql_error());
    mysql_select_db("****");
    
    $generated_number = mysql_query("SELECT COUNT(*) AS cnt FROM mailer") or DIE(mysql_error());
    
    $myquery = mysql_query("SELECT * FROM mailer LIMIT $generated_number, 1") or DIE(mysql_error());
    
    while($r=mysql_fetch_array($myquery))
    {
    
    $id=$r["id"];
    $flyer=$r["flyer"];
    $date=$r["date"];
    
    }
    
    
    echo "$flyer";
    ?>
    

  2. 
    <OPTION <?php if($var == adult){ echo selected="selected"; } ?>>Adult</OPTION>
    <OPTION>Alcohol</OPTION>
    <OPTION>Bar</OPTION>
    <OPTION>Blonde</OPTION>
    <OPTION>Brunette</OPTION>
    <OPTION>Classic</OPTION>
    <OPTION>Men</OPTION>
    <OPTION>Sports</OPTION>
    <OPTION>Women</OPTION>
    
    

     

    Something like that going all the way down should do it, I believe. :]

     

  3. Fairly simple question I think, I've just never had to do it before. I'm going to have an array with like 300 items or more and need to be able to delete duplicate items. Is there a function or something I am looking for to do this? Don't want anyone to write it for me but show me which direction to go. Thanks.

     

    Array example in case my description sucks:

     

    0 - alpha

    1 - beta

    2 - charlie

    3 - beta (gets deleted)

    4 - delta

    5 - alpha (gets deleted)

  4. Have you tried to echo out $update   $_POST["MM_update"]  &  $_POST["MM_update"], to make sure they are set? You hay not even be running your query by the looks of it. I would try and echo those variables out at the top and make sure I am getting that far at least.

     

    You also need a mysql_query like PFM said above  :o

  5. Neither of these questions are php related. Radio buttons are basic html and the other would be something to do with javascript I am sure.

     

    <input type="radio" name="group1" value="Milk"> Milk
    <input type="radio" name="group1" value="Butter"> Butter
    

     

    Name needs to be the same for items in the same group, meaning if you want only one selectable out of 10 options, the name has to be the same for all of them. This topic should probably get moved soon.

  6. Cron jobs wouldn't even be for what you're trying to do. You just want to display information on a calendar, correct? When you set recurring to 0 or 1 in the db, lets say 1 = TRUE, then when you pull events for your db you need to have a special statement for when recurring == 1. Let's say it is an event that is once a week every monday, well just run a loop to display that information for as far as you want to go. If you're showing your calendar month by month, just make it generate the days/times that date is going to be displayed and echo it out. I may have made it sound more confusing than it should be. Hopefully it gives you an idea of where to go ;)

  7. If you do that make sure it isn't just looking for capital letters but capital letters with lower case after and before it, to make sure it is like your example. Also make sure it isn't suppose to be together for whatever reason (can't think of any atm, but im sure there are cases where you put a capital in the word like "McDonalds" or so)

  8. The guy getting pissy.

    You tested just before you transfered, and right after you were having database errors? It really depends on what went on around there and how things were done I guess. Just trying to connect to the database and/or grab information from it shouldn't screw it up. Have you looked at the database in anything like phpmyadmin to see that everything was in fact there?

     

    Yeah, check logs like matt said.

×
×
  • 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.