Jump to content

chasethemetal

Members
  • Content Count

    169
  • Joined

  • Last visited

Everything posted by chasethemetal

  1. I thought about using the phpMyAdmin export as php array... But that's so much code. And Niche no I don't have 100's of tables, but I do have about 30 tables and each table has 20+ fields. I don't need to copy data, just the structure... I'm building accounts for my project. And each user is a database with the same fields on the inside. So when I create an account I must generate a blank database set. Just trying to think of the work around to having to write out the database structure manually, because I plan on expanding / changing it and it would be much more efficient if I could create st
  2. So I get how to create a new database via PHP. But is there a way to load the tables from a .SQL file so I don't have to manually do 100's of table creates via php?Note* the .sql file would be on my server so no upload would be required.Any help would be great thanks!
  3. Thank you! I was able to get the results I was seeking with this method. I have not yet used Arrays much in php. Next thing to read on. Thank you so much.
  4. Thanks. I get what your saying but I'm having troubles thinking it through... Here is my code...It prints like so. It's obviously wrong because I'm just calling the SUM(count) twice.. I'm just a little lost here getting better every day though!['07/19/2011' , 12, 12]; ['07/19/2011', 20, 20];but it should be['07/19/2011', 12, 20]; $query = "SELECT date, SUM(count) FROM playcount GROUP BY uid DESC LIMIT 2"; $result = mysql_query($query) or die(mysql_error()); while($row = mysql_fetch_array($result)){ $str.="['".$row['date']. "', " . $row['SUM(count)']. ", " . $row['SUM(count)'].
  5. Sorry that didnt look good. 3 columns.
  6. I have a database table named count. Inside lives some fields for example, date, song, playcount.I've managed using SUM() to get the total playcount based by date. Nice, so I have a way to look at daily TOTAL play counts. How it works is every song has a date and the playcount is an integer that gets updated every time someone plays a song, so I sum() playcount based on the date. Anyways back to the issue. For instance I have 2 songs, so the fields look like thistablename:countsong playcount datesong1 12 07/19/11song2 25 07/19/11But what is stumping me
  7. Thanks. I've got my work cut out for me. I'll post as I gain progress...
  8. HeyI am currently using jPlayer for an audio player on website. It's great easily customized HTML 5 / CSS audio player. My only issue with the whole thing is the location of the MP3's are visible in the code...What it looks like in the jQuery:MP3: http://www.website.com/song.mp3but what I think it should look like is...MP3: http://www.website.com/stream.php?song=song.mp3and in that php file it will link to media BEHIND the public_html folder... BUT the kicker is how can I make it so that a stream ONLY happens when that URL is being accessed via the jplayer.php file....My website is structured
  9. I figured it out. I basically have a JavaScript counter that loads in a <div> when a user clicks a button. Inside that counter I have it load into yet another PHP page where I use the _GET function to get the seconds as the count up... So it reloads this little php page every second thus changing the value of X every page load. Ba Bang!
  10. Hey!I have a script that needs to perform 3 different mySQL inserts based on time the scripts been on. My theory is this:$x = (seconds, this needs to be constantly changing... so if i were to echo it, it would be a moving timer)if $x == "10" { insert into sql...}if $x == "30" { insert into sql... }if $x == "90" { insert into sql... }I am trying to record the length someone is on the script... And those are my 3 check points. Any help would be awesome!!
  11. Thanks that did the trick! This issue is solved. Over n out.
  12. This is my current Query. I cant figure out where to but the NOT LIKE '' $query = "SELECT fromwhere, COUNT(fromwhere) FROM uniqueVisit GROUP BY fromwhere ORDER BY COUNT(fromwhere) DESC LIMIT 5";
  13. So there is one more piece to this puzzle. If $data['fromwhere'] = "" then I don't want it to count it. In my database there are a large amounts of nothing in the fromwhere field, simply because I started filling them in late. So I was wondering if there was a way exclude counting if the fromwhere field is empty. Thanks
  14. waaait got it!!!! $i = 0; while ($i <= 4) { while($data = mysql_fetch_array($result)){ $x = $i++; echo "$x There are ". $data['COUNT(fromwhere)'] ." ". $data['fromwhere'] ." items."; echo "<br />"; } }
  15. I spoke too soon.That actually results in this...0 There are 45 http://www.sitename.com/100.php referring visits1 There are 45 http://www.sitename.com/100.php referring visits2 There are 45 http://www.sitename.com/100.php referring visits3 There are 45 http://www.sitename.com/100.php referring visits4 There are 45 http://www.sitename.com/100.php referring visitshmmm any thoughts...
  16. Thank you. That made sense. Heres my solution... $i = 0; while($data = mysql_fetch_array($result)){ while ($i <= 4) { $x = $i++; echo "$x There are ". $data['COUNT(fromwhere)'] ." ". $data['fromwhere'] ." referring visits."; echo "<br />"; } }
  17. Yes I figured as much. I thought there might be a script that could change the scroll scale and speed... Like change the size of the smallest scroll and change the speed in which the browser cycles down.So in theory make the steps smaller, then increase the speed of the scroll, which would render the illusion of smoother scrolling, no? Does this exist?
  18. Hey,I have this while loop. That is displaying and counting the 5 most pages viewed. It ends up looking something like this....There are 45 http://www.sitename.com/100.php referring visitsThere are 32 http://www.sitename.com/200.php referring visitsThere are 30 http://www.sitename.com/300.php referring visitsThere are 12 http://www.sitename.com/400.php referring visitsThere are 10 http://www.sitename.com/500.php referring visitsBut what I cant figure out is how to count the loops so the echo'd result looks like....0 There are 45 http://www.sitename.com/100.php referring visits1 There are 32 ht
  19. Hey all!So I'm currently developing a website that doesn't have that much content on it. We are talking like 4 or 5 <div>'s with stuff like the vimeo player embedded in them. Now I've noticed that when I scroll the window down it's kind of jumpy... My theory is that the <div>'s aren't tracking as smoothly as they could be when the user scrolls down the page.Are there any scripts that can make my page scroll very smoothly when the user scrolls down the page??? Thanks so much.
  20. Yeah thats what I was thinking. Java + PHP combo. Unfortunately I am not the best with Java. Anyone know of any reference points to start with when it comes to building a basic java function like say.When this img is clicked. load this src file (.mp3)? What would that look like?
  21. I disabled flash and bandcamps music player still works. So they must be doing some funky java in the background perhaps.GuyBri89 when you say use the <object> tags how would that work? I understand how to use PHP to pull my mp3's from a secure location. But I have never used the object tags unless associated with flash. Any light on what you mean would be cool.
  22. Ingolme, this is not true. Visit secretmusic.bandcamp.com for example. Notice bandcamps musicplayer is entirely free of flash, and works perfect on an iPhone/iPad.ALso everyone sorry for the double post. That was an accident.
  23. HelloI've searching the internet for some insight on how to make a secure music player w/ playlist. Basically I am curious how bandcamp.com or soundcloud.com(mobile version) works.I'd like to build my own music player NOT flash based so it works on on iPhones and iPads...I haven't been able to find any guides on how to do this where 1 the file locations aren't exposed and 2 include a play list feature.I am an expert with HTML and CSS and have quickly growing abilities in PHP. Is this a job for java? I'm clueless if anyone could point me in a direction or show me an example that would be great!
  24. When clicked it sends me to my PHP page, so that works. But the data is not sent to the database. If I have a regular old submit button everything works fine. Why isnt the javascript registering as a submit with the PHP anyone know???-----<form id="myForm" action="phpurl.php" method="post"><?phprequire_once('geoplugin.class.php');$geoplugin = new geoPlugin();//locate the IP$geoplugin->locate();echo'<input name="ip" type="hidden" value="'.$geoplugin->ip.'" />'?><a href="#" onclick="document.getElementById('myForm').submit();" name="submit">submit</a><input
  25. When clicked it sends me to my PHP page, so that works. But the data is not sent to the database. If I have a regular old submit button everything works fine. Why isnt the javascript registering as a submit with the PHP anyone know???-----<form id="myForm" action="phpurl.php" method="post"> <?php require_once('geoplugin.class.php'); $geoplugin = new geoPlugin(); //locate the IP $geoplugin->locate(); echo' <input name="ip" type="hidden" value="'.$geoplugin->ip.'" />' ?> <a href="#" onclick="document.getElementById('myForm').submit();" name="submit">submit<
×
×
  • Create New...