Jump to content

skaterdav85

Members
  • Content Count

    874
  • Joined

  • Last visited

Everything posted by skaterdav85

  1. what about this: [a-zA-Z0-9] ... Could this be rewritten like [a-9]?
  2. so what is the order of characters then? a-z then 0-9? what about capital A?
  3. I could do that, but say a user clicks to page 4 through ajax. If they do a page refresh, it would go back to page 1. So if a user found a review on page 4 and wanted to send someone the link, the person who clicks the link would only see page 1. So i'm not sure which is better... doing pagination without ajax so the page # is in the url, or just by using ajax. what's the most common? what would u recommend?
  4. Is it better to do pagination through AJAX or just have a page refresh with a URL variable telling the page? Which technique is more popular? Im creating a site that has student reviews, and im not sure which way is best. AJAX looks cooler and more web 2.0 ish, people cant exactly share links for reviews past page 1. Any thoughts?
  5. I want to check if a form field's value is between 1-10. I can do [1-9] but then its missing 10.and if i do [1-9][0], then someone can enter in 20, 30, 40 etc.Any way of doing this without doing an if statement?
  6. I want to get the most recent statuses from my Twitter and display them on my website that I've done in PHP. Im familiar with REST web services, but i haven't done one where you need to login. Does anyone know any examples of this? I know this is a common thing since I've seen it on many wordpress sites/blogs.
  7. nice. those do look really good! whats the best way to learn ExtJS? I want to try it now after seeing all the cool things you've done.
  8. well the google api has more than just pie charts. they have bar graphs both vertical and horizontal, easy ways to have legends, line graphs, etc. I was pretty excited when i saw this haha. A quick easy way to get a sweet looking chart on your application!
  9. I just discovered this.http://code.google.com/apis/chart/Its Google's Chart API. Way easier to use than the Php GD library, and it looks a whole lot nicer. Its a fast way to do dynamic charting. Justsomeguy, are there any drawbacks to using something like this versus the GD library or Imagemagick?
  10. I want to pull data from my blog as well as write data to my blog through another web application. Does Wordpress have some API or web service that allows this capability?
  11. In this example, is 'arial.ttf' in the same directory as this script? When you download fonts, do they come in .ttf files?
  12. do you mean something like this? By referencing the alias name such as 's1.semester' using the 'table_name.column_name' syntax, does 's1' refer to the results of the join or is it just referring to an alias for the table named 'Semesters'? SELECT Reviews.review, s1.semester AS start_semester, s2.semester AS end_semester FROM ReviewsINNER JOIN Semesters AS s1ON Reviews.start = s1.IDINNER JOIN Semesters AS s2ON Reviews.end = s2.ID
  13. do you mean something like this? By referencing the alias name such as 's1.semester' using the 'table_name.column_name' syntax, does 's1' refer to the results of the join or is it just referring to an alias for the table named 'Semesters'? SELECT Reviews.review, s1.semester AS start_semester, s2.semester AS end_semester FROM ReviewsINNER JOIN Semesters AS s1ON Reviews.start = s1.IDINNER JOIN Semesters AS s2ON Reviews.end = s2.ID
  14. how would i reference each value for 'start' and 'end' in my php loop?i did something like:while ($row = mysqli_fetch_array($result)) {echo $row['start']; //this gives me the number used to join the tablesecho $row['semester']; //this gives me the respective value for the startecho $row['end']; this gives me the number used to join that same table to the end column in Reviews}//how do i get that value for 'end'?
  15. How would I Join the values of one table to multiple columns in another table?For example, I have a table called "Semesters", which has 2 columns: 'ID', 'semester'I have another table called "Reviews", which has 4 columns: 'ID', 'review', 'start', 'end'Both the 'start' and 'end' columns in the Reviews table use values from the Semester table. I tried this, but apparently you cant use the same table twice in different joins. SELECT * FROM ReviewsINNER JOIN SemestersON Reviews.start = Semesters.IDINNER JOIN SemestersON Reviews.end = Semesters.ID How do i solve this?
  16. I want to hide a div, but i want it to still be there becase the information in the div is required for the ajax call im doing. Anyone know how to hide the div but have it still be there so it's contents can still be used?
  17. I have a bunch of comments in my code, but i dont want them to visible to the user if they read the source code. My comments are about the sql queries themselves, so that wouldnt be good for hackers. Is there any way to hide all your comments in php?
  18. haha wow. thats alot of web development work. you must be an expert at this!so one more question about the example above. How would i do an insert using joins? In this example, would the SQL look for PG-13 in the ratings table, find that ID, and insert that ID into the dvd_title? Or is this completely wrong? INSERT INTO dvd_titles (title, rating_ID)VALUES ('Transformers', 'PG-13')INNER JOIN ratingON dvd_titles.rating_ID = rating.rating_ID
  19. wow, sounds like you do quite a bit of development outside of work. What made you choose ExtJS over something like jquery? do you work for a web development firm or a company on the web development team?
  20. oh ok that makes alot more sense. In that new temporary table, does it contain all the columns from both tables, or just the ones you chose in the SELECT part of the SQL statement?just curious, but i see you are focusing on php and javascript. do you just keep reading different books on these languages? are u doing javascript or a js library?
  21. ok i see. What if the rating table had a relationship to the genre table and had no relationship to the dvd_titles table. And say you decide to use the USING keyword like this:SELECT title, genre, rating FROM dvd_titles INNER JOIN genre USING genre_IDINNER JOIN rating USING rating_IDWHERE title LIKE 'A*' How does the sql interpreter know if rating_ID is joined to the dvd_titles table or if its joined to the genre table? Or would the query be different?
  22. oh ok. well how would you convert this sql statement into using joins? All the inner join examples i've seen only combine 2 tables. SELECT title, genre, rating FROM dvd_titles, genre, rating WHERE genre.genre_ID = dvd_titles.genre_ID AND rating.rating_ID = dvd_titles.rating_ID AND title LIKE 'A*' heres the schema
  23. whats the difference (any advantages or disadvantages) of enforcing table relationships through the WHERE clause or through JOINS? Heres a simple example. SELECT title, genre FROM titles, genres WHERE genres.genre_id = titles.genre_id OR through an inner join SELECT title, genreFROM titlesINNER JOIN genresON genres.genre_id = titles.genre_id
  24. So i want to create a site with a search box that does an auto suggest using ajax like this:I know how to do the ajax part, but how do you create a window underneath an input field like in the image? Is that an html thing or a javascript thing?
  25. so im using MAMP, and i am trying to get this ternary operator to work. when i use a regular if statement, my variable gets set, but if i use the ternary operator, it doesnt. I have no clue what im doing wrong. Ive looked at several tutorials and i thought i was doing this right.if statement if($type == 'ad_campaigns') { $table = 'ad_campaigns';} ternary operator version $table = ($type == 'ad_campaigns') ? 'ad_campaigns' : '';
×
×
  • Create New...