Jump to content

Jessica

Staff Alumni
  • Posts

    8,968
  • Joined

  • Last visited

  • Days Won

    41

Everything posted by Jessica

  1. Actually I take it back. http://css-tricks.com/attribute-selectors You may be able to. Try this.
  2. No. You can style all labels or use classes or ids.
  3. You still need to start checking for errors. If you don't get in the habit of it (or write a wrapper for this) it will take you longer to debug future problems.
  4. Why don't YOU tell US what the problem is? IE, why do you THINK there is a problem. Try checking for errors. Try running the query in phpmyadmin. What HAVE you done besides stare at it? :-P Oh and also once you get your error, you're going to want to read this page of the manual. http://dev.mysql.com/doc/refman/5.0/en/select.html
  5. There is definitely something wrong with the query. I can see what it is right away. Figuring it out would expose what's wrong with your function. If you were checking for errors, it'd be a lot clearer. See the link in my signature on how to debug your SQL.
  6. You're probably going to want to use an array, if I understand your goal.
  7. I say you should go with what Psycho said, but if you want to keep trying to make this code work you have to explain what you mean by "doesn't work". What part doesn't work? What steps have you taken to debug it?
  8. And where is $row['Nom_v']; defined? Do you see a pattern yet?
  9. And where is $n defined? Before you respond, I suggest you read the links in my signature about how to get good help. Otherwise this is going to take 5 times longer than it needs to, and I just don't care to do that.
  10. Probably because '$n' means the literal string '$n'. You probably want to use $n. But the code you've posted has nothing showing either of those.
  11. You need to check for errors. See the link in my signature. Edit: Actually it sounds like you're not even connected to the database.
  12. Can you remove the useless [0]-[10]s? If so do that and it'll be a lot easier. Otherwise loop through $this->data['price_list'] and check it there.
  13. Seriously dude, I'm working with the code you gave us. You do NOT have to fetch a row before getting the number of rows. http://us2.php.net/mysql_num_rows I'm suspecting that is messing up your count, the fact that you're trying to do it after using the rows. We can't tell you why it's not showing what you expect because you refuse to do ANYTHING we suggest. I'm done.
  14. As was suggested, try adding the other column names so you can see what the three rows are. I'm curious what it would look like if you changed it to this: <?php function photo_history_bypaths($courriel) { $table = "_files"; $courriel = trim($courriel); $sql =mysql_query("SELECT img_name FROM $table WHERE email = '$courriel'AND ok = '1' ORDER BY id DESC LIMIT 0 , 3") or die("&erreur=Échec de la requête !"); if ( mysql_num_rows($sql) > 0) { print "&erreur="."&nombre=".mysql_num_rows($sql)."&liste=".$flashstr; } } ?>
  15. So then where are you stuck? You already had someone write the above code for you in the other thread, now apply what you should have learned from that to this. Or restructure the array. I've done a lot of work like this, lately I had to write a report that had 8 levels of country, region, state, city, district, etc etc. It was easiest to do a multi-dimensional array that had many levels. (That report was not only deep in levels, but long (rows) and wide(columns) so we actually utilized some ajax loading and only loaded one level at a time, but the initial version that only had 3 levels would have looked something like this: IE: $locations = array( 'Country 1'=>array( 'text'=>'text', 'url'=>'url here', 'states'=>array( 'state 1'=>array( 'text'=>'text', 'url'=>'url here', 'cities'=>array( //etc etc etc ) ), 'state 2'=>array( 'text'=>'text', 'url'=>'url here', 'cities'=>array( //etc etc etc ) ) ) ), 'Country 2'=>array( 'text'=>'text', 'url'=>'url here', 'states'=>array(//etc etc etc) ) );
  16. I don't see anything that links the grandchild elements to their parent elements. You should make this a multi-dimensional array, or store the parent/foreign key in the array.
  17. By normalizing your data. Seriously. I'm not saying it for the fun of it, the problems you are running into stem from bad design. Fix it now, it'll be easier to fix it now than later.
  18. Google "normalization". You don't want to store the data as a delimited list.
  19. Well either make an effort to learn or hire someone.
  20. I'm going to add emoji to my passwords so I can ONLY login on my iPhone. That'll show me!
  21. Btw I said string - a string can contain multiple variables. If you need them separate, use an array. Or separate the logic into two functions.
  22. I'm sick, google it.
×
×
  • 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.