Jump to content

Muddy_Funster

Members
  • Posts

    3,372
  • Joined

  • Last visited

  • Days Won

    18

Everything posted by Muddy_Funster

  1. Couldn't you store the skin decision in the database with the other user credentials? - or be a bit more extreme and alocate skins by end user IP address.
  2. What OS are you using? Is it the same as your production server is using? How did you assign read/write access on the folder? What web server are you using IIS or Apache? What version of PHP are you using?
  3. could you post your revised code - it looks as though you have put the array() that comes after the = inside the single quotes
  4. Don't use a SELECT * to get a single field...also, check the password aswell, in case there are multiple users with the same username. SELECT supporter FROM table WHERE username = 'user' AND password = 'pass'
  5. That makes no sense - if $user is a value, and not a field name - also, there is absoloutly no need for backticks in that query.
  6. Can't you just have the full A record for the site2.com point to the hosted space used also by site1.com, rather than the way it is set just now?
  7. When you perform a select on the MySQL you will loop through the returned records using a WHILE loop. Within the WHILE loop you assign the record returned to your update query and perform that there and then. I have no idea how comfortable you are with PHP and SQL so don't know how much more you need, nor do I have any table information to use to produce any example code. Here is some Psudo that should help: MySQL_Select = SELECT fieldsByName FROM table Execute MySQL_Select OR (Show Error Message) WHILE MySQL_Select returns Rows { MSSql_Update = UPDATE table SET (MSSqlFieldName = FieldReturnedFrom MySQL_Select) [repeat SET(...) for each field to be updated] Execute MSSql_Update OR (Show Error Message) }
  8. It can be easily done using a php script, you just need to make sure that you have the relevent libraries enabled, then just run an update on the msSql from within the select loop from the MySql.
  9. Not personaly, but I can't imagin a situation where I would be using that kind of setup. I would expect the issue is to do with the redirect from one domain to another, it would make sense that it does not maintain a perpetual connection between pages at the end user level. You will probably need to use custom cookies to store the info on the client machine (assuming that it has cookies enabled) as a workaround.
  10. JOINS are part of the FROM clause, not the WHERE one. Also - details of the "fail" are usualy warmly recieved. $query="SELECT submissions.submission_number, submissions.submission_employer_company, submissions.submission_employer_industry, submissions.submission_employer_town_or_postcode, submissions.submission_employer_country, submissions.submission_employer_department, submissions.submission_employer_department_hiring_situation_detailed, submissions.submission_employer_department_hiring_situation_summary, submissions.submission_employer_application_contact, submissions.submission_employer_latitude, submissions.submission_employer_longitude, submissions.submission_account_number, submissions.submission_timestamp, accounts.account_number FROM submissions INNER JOIN accounts ON (submissions.submission_account_number = accounts.account_number) WHERE ((submission_employer_country = '$search_country') AND (submission_employer_department = '$search_department')) ORDER BY submission_timestamp desc limit 10";
  11. Sounds like you need a full project analysis on this rather than the advice of a community forum. To answer you in deapth could take pages (although it would require more information from you). If you're wanting to run with it here we will need some more information to effectivly answer your question: 1- What skills are you bringing to the table regards web development? 2- What systems are you planning to run this on? 3- What are you planning to spend on it (ball park obviously).
  12. could you please post up your current table structures...I'm having a hard time getting my head round what you are doing here....it sounds insane
  13. I would suggest looking into "foriegn keys" and "cascade indexing" to achieve what you are looking for.
  14. what about: <?php $checkbox=$_POST['checkbox']; $counter = 1; $append_sring = ''; foreach ($checkbox as $checkboxes) { if($counter == 1){ $append_string .= " WHERE sid='$checkboxes'"; $counter = 2; } else{ $append_string .= " AND sid='$checkboxes'"; } } $append_string .= "GROUP BY teachers.name"; $query_string = "SELECT name FROM teachers RIGHT JOIN subjects ON teachers.sid = subjects.sid $append_string"; $result_set = mysql_query($query_string) or die ('Fatal Error:<br>'.mysql_error()); while ($each_row = mysql_fetch_assoc($result_set){ echo "{$each_row['name']} - teaches all the chosen subjects" } ?> Not tested and probably full of holes, but it should give you something closer to what you are looking for. - Obviously replace field/table names as appropriate.
  15. in the interim using brackets should get you the desired effect: ...WHERE ((row_1 = '$value_a ' AND row_2 = '$value_b ' AND row_3 = '$value_c ') OR (row_1 = '$value_c ' AND row_2 = '$value_a ' AND row_3 = '$value_b ') OR (row_1 = '$value_b ' AND row_2 = '$value_c ' AND row_3 = '$value_a ')....( etc etc etc.))"
  16. yeah, the s,f and u (glad there's not a t in there as well or it could get offensive ) you do not need to alias your table names, just use the table name where you are using the alias. That said I think there is only one instance whare a column name would be ambiguous and need you to declare the table name prior to the FROM clause. Trying to alias within a JOIN statement never a good idea, so just write it as a simple SELECT field, list,.... FROM table1, table2 LEFT JOIN table3 ON table2.field = table3.field ORDER BY etc.
  17. What's wrong with making a master include script that calls a selection of the other includes specific to given criteria?
  18. Try it without the sensless and needless aliasing of your three tables and see what happens then.
  19. Could be a field name error - like case mistake on User or using User instead of Users. Check the field name first.
  20. have a look at here: http://msdn.microsoft.com/en-us/library/ms186724.aspx
  21. I think you want to use a different function on the date, using a minus converts it on the fly to a unix time value. Try using DATEDIFF or DATE_SUB and see what you get (or CAST the result back into date format after you have applied your logic to it).
  22. SELECT Name, Time, Description FROM Table WHERE ((ID = ANY (SELECT ID FROM LinkList WHERE Link LIKE '%term%') OR Name LIKE '%term%' OR Technique LIKE '%term%' OR Origin LIKE '%term%' OR Time LIKE '%term%' ) AND (User_ID='1' OR Public=1)) is that what your looking for?
  23. assuming that you have admin access to the server then you can force reset the password for mysql without being able to login to the database it's self. this should let you access from the console again where you can then re-apply priviledges and reset passwords. google for MySQL root password reset should get you on the right track.
  24. take the single quotes out from around $yesdelete - it's an integer field not a string.
  25. It depends - Relationships can be generated on the fly within queries (using RIGHT or LEFT JOIN), they don't need to be declaired through key indexes.
×
×
  • 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.