Jump to content

miancu

Members
  • Posts

    14
  • Joined

  • Last visited

    Never

Everything posted by miancu

  1. try to use an INNER JOIN instead of this select from 2 tables. Also manipulate the $email var before adding it to the query so it is in the needed format 'email1@..,email2@..' and add the var without the ''. try it like this: SELECT u.avatar, u.displayname, p.about_me FROM users u INNER JOIN profiles p ON p.user_id = u.id WHERE u.email IN ($email) AND LIMIT $offset, $rowsperpage hope this helps!
  2. Just a tip to display your array nicer, maybe even more sugestive: echo "<pre>"; print_r($arr); echo "<pre>"; And your problem can be easily solved with a foreach loop: foreach($arr as $index=>$item){ echo $item['id']; //also available for further manipulation } Hope this helps!
  3. The trick I used was to give fixed width and float:left to the left DIV and no floating and no width to the DIV in the right. The right div aligns by itself on the left and takes the entire space(100%). Hope this works for you too!
  4. I don't see enctype="multipart/form-data" for the edit page <form>.
  5. I hope this will make it easier to understand: http://davidwalsh.name/php-shorthand-if-else-ternary-operators
  6. do you mean :like this? $string = ($Statuts == "01")? 'Online!' : 'Offline!' ;
  7. Does this help? // I assume you know which project ID you want = $projectID echo "projectname: ". $projects[$projectID]['projectname'] . "<br />"; echo "targetlang: ". $projects[$projectID]['targetlang'] . "<br />"; //... more values to display here according to the key - targetlang , sourcelang , units If this is not what you need, please give more details, because I am a little confused on what you need here.
  8. you're welcome! glad to help! it would probably work somehow with your version too, but i didn't try it, since it seemed to complex and i didn't really have an example to see them.
  9. I think you got lost in so many arrays you're using. If I understand correctly your needs, you might be able to simplify your $rows array when you retrieve the data from database: $projects = array(); //this is instead of your $rows foreach($projectIDs as $row => $value) { $query = mysql_query("SELECT * FROM ".PROJECT_TABLE." WHERE id = '$value' "); $row = mysql_fetch_array($query); $projects[$row['id']] = array(); $projects[$row['id']]['projectname'] = $row['projectname']; $projects[$row['id']]['projecttype'] = $row['type']; $projects[$row['id']]['sourcelang'] = $row['sourcelang']; $projects[$row['id']]['targetlang'] = $row['targetlang']; $projects[$row['id']]['units'] = $row['units']; // continue here with rest of variables you have } You could then use $projects array for further display or manipulation. Let me know if this helps you!
  10. try using parseInt() for the value in the form. Hope this helps!
  11. My idea will be to have a separate function where you get all results from database with (post_numb>just deleted post_numb) ordered by post_numb ASC and using an counter(in PHP) to update each field post_numb with that counter(that starts from just deleted post_numb to the total number of records). You call this function every time you do a delete post and have the deleted post_numb as a param for the function. If you have a lot of records in the database, this function might be a little time consuming, so you might just want with the second option I have you. Hope this is helpful!
  12. maybe every time you have the delete post operation called, you can add a function called to reorder the post_numb values to avoid having missing numbers. or maybe you should just get them ordered from database after the post_num and then use an index to display #1,#2, etc in the php. hope this helps!
  13. i found this, maybe it helps you: http://www.farad.com.au/source_code/php/setting_floating_point_precision_src.php
  14. try something like: SELECT a.* FROM allusters a INNER JOIN doctors d ON a.id=d.obj_id WHERE d.value='provider' if I understood the requirement, this should work to give the allusters that are providers. hope this helps!
  15. miancu

    Hi!

    Hi everybody! My name is Miha, I am from Romania, but I've been living in US for almost 2 years now. I've been developing in PHP(also HTML/CSS/Javascript and Mysql) for 5 years now, and I've been involved in various projects, small or big. I am sure I still have a lot to learn and I am here to see what else is there in the PHP world and web application architecture as well as to offer my help and advice when I can. See you guys around here!
×
×
  • 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.