gudmunson
Members-
Posts
17 -
Joined
-
Last visited
Never
Profile Information
-
Gender
Not Telling
gudmunson's Achievements
Newbie (1/5)
0
Reputation
-
Nothing is happening when everything checks out ok
gudmunson replied to Garath531's topic in PHP Coding Help
Hmm, have you tried changing this: $query = "INsERT INTO users (username, password, email) values ('$username', '$new_pass', '$email')"; into this? $query = "INsERT INTO users (username, password, email) values ('" . $username . "', '" . $new_pass . "', '" . $email. "')"; It's possible that the reason it isn't inserting into your database is because it is giving an SQL syntax error. If you aren't getting one, I'm not sure what the issue is. The other thing to check is to make sure that username, password, and email are all valid fields in your table. -
Nothing is happening when everything checks out ok
gudmunson replied to Garath531's topic in PHP Coding Help
I think i see an issue, I had this problem when upgrading from php 4 to php5. in this code: //Check to see if username is in use already. $sql=mysql_query("SELECT username from users WHERE username = '$username'") or die(mysql_error ()); change the query to: mysql_query("SELECT username from users WHERE username = ' " . $username . " ' ") I had to change that in a bunch of pages and as soon as I did it, my pages started working again. Hope this helps. -
Thanks, guys.
-
When I include stuff, I don't use the http part. Not sure if that's a valid type for including. I use an absolute site path: require_once('/includes/db/connect.php'); You could try stripping the http://sitename out and just put in the absolute path (from root-/)
-
Hey guys, I have a question. I have an interesting scenario where I have multiple checkboxes sent via post to a next page. they are with name="checkbox1", name="checkbox2", etc. How do I access those on the next page? There could be quite a few of them, so I need to use a loop. I was hoping to access them via this method, but it doesn't seem to work. Any ideas? $_POST['checkbox' .$i]
-
Hey All, I had a fully functional web server, and I attempted to install gd as well as libjpeg so that I could use some image manipulation functions. My php ./configure/make/make install didn't give any errors. When I attempt to start apache2, I get the following error: $ ./apachectl start httpd: Syntax error on line 425 of /usr/local/apache2/conf/httpd.conf: Cannot load /usr/local/apache2/modules/libphp5.so into server: /usr/local/apache2/modules/libphp5.so: Undefined symbol "php_write" $ I have added the following lines at the end of httpd.conf (the line numbers are obviously not there :): [line 425] LoadModule php5_module modules/libphp5.so [line 426] AddHandler php5-script php [line 427] AddModule mod_php5.c I have also checked and modules/libphp5.so is there: $ ls -l libphp5.so -rwxr-xr-x 1 gudmunsn wheel 979694 Aug 2 15:37 libphp5.so $ Any idea how to fix this? I am stumped.
-
[!--quoteo(post=381755:date=Jun 8 2006, 10:59 PM:name=fenway)--][div class=\'quotetop\']QUOTE(fenway @ Jun 8 2006, 10:59 PM) [snapback]381755[/snapback][/div][div class=\'quotemain\'][!--quotec--] Well, you already eliminated the obvious ones (no subquery support, error in the subquery itself), so I'm not really sure. It looks correct syntactically, but obviously, MySQL doesn't agree. What version are you running? And could you post the CREATE TABLE output for all tables involved? I'll take a closer look. [/quote] I did a bit more research and I'm running mysql 4.0.1, and subqueries weren't supported until version 4.1, so that is my answer! I ended up making a join statement that did away with the subquery altogether. Thanks for the comment though.
-
Hey guys, I am trying to write a sub-query to select a subset of data from my database but it is not working. Can somebody take a quick look to see if there is something simple I'm missing? I have tried the subquery by itself and it works, as does the outside query with one value: IN(2384)...so something is wrong. Is this not supported by mysql? [code] SELECT * FROM Schools_equiv_request WHERE reg_id IN ( SELECT sr.id FROM Students_registration sr LEFT JOIN Programs_terms pt ON pt.id = sr.term_id LEFT JOIN Programs p ON p.id = pt.program_id WHERE p.school_id =88 ) [/code] Here's what phpmyadmin tells me: MySQL said: Documentation #1064 - You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near 'select sr . id from Students_registration sr LEFT JOIN Progra Any help would be appreciated, I've been working on this for longer than I'd like to admit [img src=\"style_emoticons/[#EMO_DIR#]/wink.gif\" style=\"vertical-align:middle\" emoid=\":wink:\" border=\"0\" alt=\"wink.gif\" /]
-
Can I safely delete an httpd.core file that's over 600 mb? I would also like to know why it's that big, but i wanted to make sure it's ok to delete it before doing it.. -su-2.05b# ls -l httpd.core -rw------- 1 root wheel 68628480 Feb 22 2005 httpd.core Thanks, Nathan
-
Are there changes in left joins in mysql 4 -> 5?
gudmunson replied to gudmunson's topic in MySQL Help
[!--quoteo(post=340026:date=Jan 25 2006, 09:02 PM:name=fenway)--][div class=\'quotetop\']QUOTE(fenway @ Jan 25 2006, 09:02 PM) [snapback]340026[/snapback][/div][div class=\'quotemain\'][!--quotec--] Yes, there was a major change: Basically, your first two tables were implicity grouped together, and now they are not, so the JOIN doesn't "use" the first table. You can fix this by simply changing the comma to JOIN. Hope that helps. [/quote] Thanks, that does help. Unfortunately I have about 50,000 lines of code with many, many join statements, so I think I'm better off installing mysql 4 at this point. At least I know why now. Thanks! Nathan -
[!--quoteo(post=339990:date=Jan 25 2006, 06:15 PM:name=Rascii)--][div class=\'quotetop\']QUOTE(Rascii @ Jan 25 2006, 06:15 PM) [snapback]339990[/snapback][/div][div class=\'quotemain\'][!--quotec--] Thank you! You were extremely helpful. I'm going to give it a try tonight. [/quote] If you have root access to both the machines, you can just copy the databases over! Any subdirectories in /usr/local/mysql/var (my default database location) are actually databases. Just copy those directories+files from the old machine to the same location on your new machine and you should havea copy of your database.
-
Hello guys, I have a question about mysql versions...I have a query that has worked great for a year or so: SELECT DISTINCT Schools.name AS school_name, Schools.city, Countries.country, Schools.id AS school_id FROM Programs_terms, Terms LEFT JOIN Programs ON Programs_terms.program_id = Programs.id LEFT JOIN Programs_Relationship ON Programs_Relationship.id = Programs.type LEFT JOIN Schools ON Programs.School_id = Schools.id LEFT JOIN Countries ON Schools.country = Countries.id LEFT JOIN Programs_language ON Programs.id = Programs_language.program_id LEFT JOIN Programs_Relationship_Type ON Programs_Relationship.type_ag = Programs_Relationship_Type.id WHERE Terms.id = Programs_terms.term AND Programs_terms.Display = 'Y' AND Schools.Display = 'Y' LIMIT 0 , 30 When I use phpMyAdmin 2.6.1 and MySQL 4.0.16 this query is successful. On another system, running phpMyAdmin 2.7.0-pl2 and MySQL 5.0.18, it doesn't work. Has something changed in the syntax of mysql which would make this query suddenly not run correctly? I'd like to think it's a configuration issue but at this point I'm not sure. Thanks, Nathan
-
I'm running apache 2.0.55 and I'm trying to figure out how to disable http so I can only use https. Currently going to my ip from http:// and https:// yields the same results but I only want to use https. this seems like a pretty simple question, but I haven't been able to find anything out looking through google...Is this an apache option or an OS option? I'm running a freebsd system. Thanks! Nathan