envexlabs
Members-
Posts
256 -
Joined
-
Last visited
Never
Everything posted by envexlabs
-
[SOLVED] Grabbing from 2 tables duplicates the rows about 10 times
envexlabs replied to envexlabs's topic in MySQL Help
Worked like a charm! Thanks. -
[SOLVED] Grabbing from 2 tables duplicates the rows about 10 times
envexlabs replied to envexlabs's topic in MySQL Help
Thanks, I looked into union before, but it just looked like it was grabbing all the events and then the specials. I'll give this a shot. -
Hello, Basically, i have 2 tables. events and specials. These are 2 separate tables with no linking elements. I want to grab from both because i want to display a list of the 30 newest events and specials created, sorted by date. Here is the table structures: SPECIALS ------------------------------- id venue_id title more_info created EVENT ------------------------------- id venue_id fb_eid title date poster_thumb poster_large buy_link more_info The only thing these two tables share is the venue_id. Here is the query: SELECT * FROM events, specials WHERE events.venue_id IN (1,20) AND specials.venue_id IN (1,20) I'm obviously not grasping this concept, or doing something completely wrong, but i can't seem to figure out what. Can anyone shed any light on this subject? Thanks!
-
Hey, In a nutshell i'm looking for something like this: http://mystore.mysite.com Right now, i have a rewrite rule that looks like this: RewriteRule ^store/([a-zA-Z0-9_-]+)$ /store_front/store.php?slug=$1 So when someone visits mysite.com/mystore they are taken to the store page. This is working, no big deal. I've looked online for answers, but the only ones i've found are ones that redirect http://mystore.mysite.com to http://mysite.com/store_front/store.php?slug=mystore How do i keep that subdomain consistant when browsing and keep the "permalinks" (not sure if that's the right term) proper and neat? Thanks, envex (matt)
-
You are a lifesaver! Thank you very much. envex (matt)
-
Hey, Thats the way it is right now. I think it's because of the first wildcard option as well as the workouts folder inside the images folder. The only images that aren't showing are the /images/workouts/image.jpg and it only happens when viewing, site.com/sitea/workouts All other images are displaying correctly.
-
Hey, We are making it work this way so a shopper can upgrade to a store account or a store account can also have a shopper account without creating 2 seperate accounts with 2 seperate emails/2 seperate usernames.
-
Hey, I have an htaccess file that changes the sites variables based on which partner sites refer the traffic. So right now if sitea refers traffic, they point to this link: http://mysite.com/sitea/workouts the htaccess rule: RewriteRule ^([a-zA-Z0-9_-]+)/workouts workouts.php?site=$1 Everything is working fine except on the workouts page, all the images are no longer showing up because the file structure is: http://mysite.com/images/workouts/image.jpg I guess the htaccess rule is messing up with the structure because of the wildcard rule after the main .com. I've tried making a rule along the lines of: RewriteRule ^images /images/ But it doesn't seem to work. Am i missing a step? Thanks, envex (matt)
-
Hey, That's what i'm doing right now, i'm just trying to figure out what to label it.
-
Hey, Thanks for the suggestion but the site has a very colorful, laid back, personal feel and i'm thinking that sounds a bit too coorperate/grey/unfriendly.
-
Hey guys, I have a question that isn't really PHP related, more of a ui design question. On a site i'm developing we have 2 types of accounts. Store and Shopper. We are using 1 login form that checks to see if the user signed in with their email (shopper) or username (store). Everything is working fine, but i'm having trouble deciding what to call the username/email input label. Right now i think it may be confusing to users to put Username/Email Address. What do you guys think? What would you prefer to see? Thanks, envex (matt)
-
FFmpeg took my awhile to figure out how to use, just keep going at it. You would upload the video, convert it and store the path in a db. Then you would use something like JW flv player (http://www.longtailvideo.com/players/jw-flv-player/) to display the video. That's probably the easiest way. Or looking to using the Youtube or Vimeo API's.
-
$today = date('YOUR DATE FORMAT'); $select = mysql_query("SELECT * FROM `table` WHERE `date` = '$date'");
-
Using jquery with mootools is relatively simple, it just takes a bit of tweaking on jquery's end. var $j = jQuery.noConflict(); You have to rewrite all instances of $ and append the j. That way mootools can use $ and jquery uses $j
-
http://digitarald.de/project/fancyupload/ It's a mootools, ajax, swf uploader. Works like a charm.
-
parsing a php file and then grabbing it's contents
envexlabs replied to envexlabs's topic in PHP Coding Help
monday morning bump. Anyone? -
parsing a php file and then grabbing it's contents
envexlabs replied to envexlabs's topic in PHP Coding Help
Yeah, sorry it's been a long day of back and forth. The old brain is a bit fried. The reference file has no syntax errors, when i view it by itself it renders everything fine. This stupid modal box is causing a major headache, and of course it's on a friday -
parsing a php file and then grabbing it's contents
envexlabs replied to envexlabs's topic in PHP Coding Help
I don't think it's working, i'm getting: Parse error: syntax error, unexpected '<' in /nfs/c03/h04/mnt/57152/domains/wheresyourstore.com/html/test.php(5) : eval()'d code on line 1 The file i'm referencing is reference.php my modal window will grab reference.php, but it won't parse any of the php because of the way it deals with javascript loading the content. -
parsing a php file and then grabbing it's contents
envexlabs replied to envexlabs's topic in PHP Coding Help
Hey, Nope, that doesn't seem to work. Thanks though. Looks like i may have to use xhr or a json request :S -
Hello, I have a modal window that appears, but it will only accept html files. No big deal, so i thought. Is it possible to write a function that will render out a php file behind the scenes and grab all it's contents. ie. script.php <?php echo 'This Works'; If i were to use fopen or get_file_contents nothing would show up. I would like php to do it's magic and return "This Works". Any ideas? Thanks, envex (matt)
-
.htaccess, dynamic subdomains and nice permalinks
envexlabs replied to envexlabs's topic in PHP Coding Help
bump, anyone? -
Hey, I have nice permalinks working via htaccess and i would like to take it one step higher, but i'm having problems. I'm trying to introduce dynamic subdomains and this is what i have so far: RewriteCond %{HTTP_HOST} ([^.]+)\.mysite\.com$ [NC] RewriteRule ^(.*)$ http://mysite.com/store_front/products.php?id=%1 [R] Right now it's working and myvar.mysite.com is redirecting to http://mysite.com/store_front/products.php?id=myvar, but i would like it to redirect it to something like http://myvar.mysite.com/products/ Any ideas? Thanks, envex (Matt)
-
Converting a long string of days into (Year, Month, Days) format
envexlabs replied to envexlabs's topic in PHP Coding Help
UPDATE I think i've figured it out, any critique on my code? Tear it apart please! function days_between($day){ $daysin = array(31,28,31,30,31,30,31,31,30,31,30,31); $years = $day / 365; $years = floor($years); $removedays = $years * 365; $days = $day - $removedays; if($days <= 31){ $days = $days; $months = 0; }else{ for($i = 1; $i <= 12; $i++){ if($days >= 0){ $days = $days - $daysin[$i]; $months = $months + 1; } } $days = $days + $daysin[$months]; } $days = $days != 0 ? "$days days" : ''; $months = $months != 0 ? "$months months, " : ''; $years = $years != 0 ? "$years years, " : ''; $time = $years.$months.$days; return $time; } -
[SOLVED] Sessions timing out after about 5 minutes.
envexlabs replied to envexlabs's topic in PHP Coding Help
Thanks, i will look into that this morning. I know i have access to the main root, which is outside where alll my servers are held. I'll just make a tmp folder in there! Thanks again! envex (matt)