- Strength to Increase Rep
- +12
- Strength to Decrease Rep
- -3
- Upvotes Received
- 155
- Posts with Upvotes
- 145
- Upvoting Members
- 78
- Downvotes Received
- 9
- Posts with Downvotes
- 8
- Downvoting Members
- 9
Re: In my experience the fastest method would be: 1) Copy only the structure of the source to the target. 2) Dump the table contents to single CVS (TXT) files. 3) Load the text files with "Load data..." | |
Re: The $path is missing in the img tag in line 30. | |
Re: In my windows system it's in e:\Program Files\MySQL\MySQL Server 5.1\share\mysql_fix_privilege_tables.sql and on my linux system in /usr/bin/mysql_fix_privilege_tables | |
Re: You have one form in your HTML and then some input elements outside of the form. They are never sent. For me, the easiest way to transform POST data in a mail text is a post array walk: [ICODE]foreach( $_POST as $key => $value ) $message .= "$key: $value\n"; mail($to, … | |
Re: Maybe you could use an arbitrary sorting using the IDs. If the order of posts with the same date does not matter, increase the limit parameter and keep the date until there are no more posts for this date. SELECT * FROM $logbook WHERE Date>='$Date' AND ID!='$ID' ORDER BY Date, … | |
Re: Add "FIRST" after the column name. [url]http://dev.mysql.com/doc/refman/5.1/de/alter-table.html[/url] [CODE]ALTER TABLE mytable ADD COLUMN xyz(text) FIRST; [/CODE] | |
Re: You *can* export the system database (users, rights etc.) with `mysqldump mysql` and import it again, but this may lead to all sort of trouble. | |
Re: $pdf->Output() writes a PDF file. This cannot contain JavaScript. The browser will not understand your code. For passing variables between scripts use sessions and the $_SESSION array. | |
| Re: phpMyAdmin has a dump option built in, and Navicat has, too. |
| Re: [CODE]$f = fopen( 'filename.txt', 'a' ); fwrite( $f, 'something' ); fclose( $f ); [/CODE] |
Re: Did you have any difficulties with your method? If it's not broken, don't fix it. What is "this variable"? What are you doing now in your script? Are you working with sessions or with redirects or with cookies? | |
Re: If you have an account on the server, you can use cronjobs which regularly trigger actions. I recommend that you set up a PHP script which does whatever bookkeeping you need, and that you call it either directly with php <myscript.php> or via the apache server using wget http://<myserver>/<myscript.php> If … | |
Re: You need brackets around your OR clause and no apostrophes around column names: SELECT * FROM stats WHERE (ip LIKE '%192.168.0.1%' OR ip LIKE '%192.168.1.2%') AND topic!='' AND cat!='' | |
Re: If you want to learn MySQL, forget PHP. Look for a MySQL or plain SQL tutorial which does not use PHP and learn the SQL basics using the command line tool `mysql`. | |
Re: Show the output of your SHOW CREATE TABLE statement and the piece of code where you try to insert something. | |
Re: Learn about aggregate functions like AVG and SUM and about the GROUP BY clause in SELECTs. | |
Re: select distinct a.mem_id, (select count(b.ref_id) from ref_track b where b.mem_id=a.mem_id) as cnt from ref_track a order by mem_id The downside is that the aggregate function is called for each row of ref_track. | |
Re: You have to join the two tables: select * from publication p, publication_issue i where i.publication_id = p.id and p.tags like '%news' order by something limit x,y | |
Re: The varchar field should have at least 2.000 characters. URLs can be that long. See http://stackoverflow.com/questions/417142/what-is-the-maximum-length-of-a-url | |
Re: 2) is not really a MySQL question. You have to study the login and authorization mechanisms of phpBB and MediaWiki and tweak them so that they point to a common user base. This is exactly what a plugin already does: http://www.mediawiki.org/wiki/Extension:Phpbb_Single_Sign-On | |
Re: Have a look at mysql events. http://dev.mysql.com/doc/refman/5.1/en/events.html | |
Re: Your form variable is named `class_ID`, but the mysql column name is `class_name`. Looks fishy to me. | |
Re: Probably your forgot to change the delimiter before and after your procedure definition: DELIMITER // CREATE PROCEDURE LoginCorrecto ... ... END // DELIMITER ; | |
Re: From your mysql console, run show variables like "%dir%"; The result will contain a variable named `datadir` which contains the path where you should look for data files. | |
Re: Show the content of $result before the error occurs. | |
Re: You're trying to get a partial tree as a result. In this setup, you will need a (recursive) (user defined) function which walks all the way up from wtshirt to dress. |