802 Posted Topics
Re: If the species is given, the task is simple (to describe). First SELECT latitude, longitude FROM locations WHERE SPECIES=myspecies Then set a marker on your map at each lat/lon point. You can do that with the Google Maps API. If you choose other maps without an API (e.g. from Wikimedia), … | |
Re: Your outermost loop lacks a sort clause. I assume that you want an order like this, so that the thread with the youngest reply or topic creation timestamp is displayed first: [ICODE]TOPIC 1 (timestamp 1) REPLY 7 (timestamp 7) TOPIC 3 (timestamp 3) REPLY 4 (timestamp 4) REPLY 5 (timestamp … | |
Re: Set up your database and all connections to use UTF-8 as the default character set. | |
Re: You cannot update queries. You could update a database. This is a question of workflow. How do data get from the school database to your home computer? Is there a direct network connection which you might use for updating? Or would you export from mssql to an intermediate format and … | |
Re: select price * (1 - if(discount_active, 0.1, 0 )) as retail_price | |
Re: I don't know wordpress. But I recommend that you first import your raw data into mysql. Afterwards they will be much easier to manipulate. Set up a table which matches the structure of your CSV data and import them. Then you can build views or queries which adapt the source … | |
Re: No, it's not safe to use angle brackets in links because they might interfere with HTML coding and they definitely will in a lot of websites programmed by lesser geniuses. | |
Re: Change line 3 to [ICODE]or die(mysql_error())[/ICODE] which will tell you about the problem: You have to separate the assignment by comma: [CODE]UPDATE anime_list SET anime_name = '$animename', rating = '$rating', episodes = '$episodes' WHERE id='$id'[/CODE] | |
Re: And check if $_POST[id] contains anything. | |
Re: A good plan. Now go ahead and do it. If you encounter any problems, come back with them. | |
Re: Use the replace function: [CODE]update theTable set theField = replace( theField, '±', '±'); [/CODE]Obviously your interfaces got mixed up with UTF-8 and other encodings. | |
Re: DELETE the record before you SELECT it, otherwise it will appear in the result list of the select (line 4) before your delete in line 42 kills it. | |
Re: Change [CODE] insert into Borrowers() values ()[/CODE] to [CODE] insert into Borrowers values (NULL,'$BorrowerName','$Email','$Telephone','$ReasonUse')[/CODE] Do likewise with the Camera table insert. | |
Re: Which of the above words denotes your problem? followers - tweets - database - php - ? | |
Re: Your query is updating all records with type_code='1' in each loop. Maybe you want this: [CODE]update products SET cost='$cost' where p_num='$num'[/CODE] | |
Re: Of course: take me. Or have a look at getafreelancer.com | |
Re: Use the mysql function last_insert_id(). | |
Re: Try the ifnull function to protect against unwanted NULL values. | |
Re: If your app doesn't use a browser or a window, how is it connected? Some mobile device? Or a background service or daemon? Can it be programmed to periodically update its status against your database? If this is the case, you could work with a mysql trigger which records the … | |
Re: The following construct does the redirect: [CODE]if (preg_match( '~iPad;~', $_SERVER['HTTP_REFERER'])) { header( "Location: http://$mySpecialIpadSite" ); exit; }[/CODE] Refine the preg expression and substitute your site for $mySpecialIpadSite. | |
Re: Have a look at your server log. Is the server receiving requests from the swf? If yes, are they valid? Put some debugging code in the php script to see if it gets its parameters correctly. | |
Re: First of all this looks like really bad database design, storing records of different types in the same table. That said, go along the line (assuming mysql as your database): [CODE]$select = '<select>'; $result = mysql( "select * from code there type_cd = '2'" ); while ($row = mysql_fetch_object( $result … ![]() | |
Re: Storing binary image data has its advantages, too. You can easily code for referential integrity without the danger of files getting moved, overwritten or lost. And the application becomes more portable. ![]() | |
Re: PHP ordinarily is used as a server side script language. If you want to create a cookie without connecting to the server again you would rather use JavaScript. [[url]http://techpatterns.com/downloads/javascript_cookies.php][/url] | |
Re: Look here: [url]http://www.tizag.com/phpT/fileupload.php[/url] Come back if you have problems with this. | |
Re: Is your server set up to show you any errors? You can set the error reporting level in the script with [ICODE]error_reporting(E_ALL)[/ICODE] - if your server configuration allows it. [url]http://php.net/manual/en/function.error-reporting.php[/url] | |
Re: Start here: [url]http://www.freewebmasterhelp.com/tutorials/phpmysql[/url] | |
Re: Can you load /contact/security_image.php in your browser? Does it produce an image as output? | |
Re: You have to order the result set by an inline function like this: [ICODE]select id, title from product order by concat(if(title like "%$user_input%", '000',''), title );[/ICODE] This will precede the title field used for sorting with a literal '000' if the search string (here named $user_input) is part of the … | |
Re: How does the server redirect what - probably your browser? Then it's either an HTML header or a meta-tag within the output which is responsible for the redirection. In the first case you cannot do anything. In the second you can disable redirections in your browser (or use wget or … | |
Re: On my system the output is correct: [ICODE]drop table if exists pm_user; create table pm_user ( user_id int(9) primary key, user_name varchar(100), user_first_name varchar(100) ); insert into pm_user values ( 2, 'theName', 'theFirstName' ); drop procedure if exists Sp1; CREATE PROCEDURE Sp1(OUT p VARCHAR(100),OUT p1 VARCHAR(100),IN p2 INT) SELECT user_name,user_first_name … | |
Re: MySQL supports replication. Have your web database as the master and replicate it to your home server - which means in effect that only the changes are transferred to the replica. Or try the poor man's version: run your web database with a text log and play it from time … | |
Re: It might be a better idea to link the cast to the films in a separate link table with foreign keys to speed up queries and to avoid data corruption. | |
Re: You can solve your problem on the application level using a query which checks for row count in table B and only inserts into table A if there are less than 60 rows in B. You can also have half a solution with a trigger which counts the records in … | |
Re: @priteas: As far as I know you're wrong. CSV import is always the fastest with MySQL. If there are foreign keys, foreign key checking should be disabled during import for speed. | |
Re: Give it at least a try. Set up some SQL code which shows the unfiltered data. Then add the filter as a WHERE clause. Relate the tables like this: SELECT * from ofrd_subjects as subjects, fnsh_table as students WHERE students.Subj_No = subjects.Subj_No Is it a prerequisite that you use unreadable … | |
Re: Your problem is in the clause [ICODE]COUNT(DISTINCT((SELECT id FROM link_schedules WHERE schedule_id = schedules.schedule_id UNION SELECT id FROM link_events WHERE event_id = events.event_id))) as Count [/ICODE] I don't understand what you are aiming at. Cut out this clause and reconstruct it from scratch. What is it that you want to … | |
| |
Re: Since you can code your own plugins/extensions in Drupal, you're completely free to access any accessible MySQL DB using PHP. Or do you mean: Can Drupal be installed using this database on which also your vb app runs? AFAIK it can. Using its own table prefixes it can install in … | |
Re: The left join is exactly for pulling out ALL users, including those who don't have a photo. Is it correct that you can have several users for the same photo? Otherwise you would not need a join table. With the join table the query runs like: [ICODE]select u.id, p.id from … | |
Re: Change the line [ICODE]$sql_result = mysql_query($sql,$connection);[/ICODE] to [ICODE]$sql_result = mysql_query($sql,$connection) or die(mysql_error());[/ICODE] which will tell you more about the cause. Since I do not see any syntactical errors I assume that you got either the database name or the table name or some field names wrong. Try [ICODE]select * from … | |
Re: At my system it works: [ICODE]drop table if exists banks; create table Banks(Bank_id integer, Bank text); drop table if exists FX; create table FX (ID integer, Bk_id integer, currency text, trans enum('Buy','Sell'), value integer); insert into Banks values (1,'X'),(2,'Y'); insert into FX values (1,1,'EUR','Buy',1), (2,1,'EUR','Sell',2), (3,1,'USD','Buy',3), (4,1,'USD','Sell',4), (5,2,'EUR','Buy',5), (6,2,'EUR','Sell',6), (7,2,'USD','Buy',7), … | |
Re: Set up a nice specification and feed it to getafreelancer.com or other outsourcing platforms and let some professional do it for you. It's not difficult, but if you don't even know where to start then three months could put you in a tight spot. But if you have a clean … | |
Re: What's an "item", what is a "course" in your database? | |
Re: I assume that the auto_increment field is filled by the system AFTER the insert. You could instead have an update trigger and bracket the insertion of a new customer with an update statement on the row just inserted into a transaction. Also I'd like to ask if it really makes … | |
Re: You cannot have a field named 0 in your field list. Are you feeding the database via phpMyAdmin? How do you prepare your insert statement? | |
Re: You can import CSV files with the mysql command line client with the LOAD DATA statement ([url]http://dev.mysql.com/doc/refman/5.1/en/load-data.html[/url]). Put the CSV file on your server so that you won't have network timeouts. What does it mean that the entries are not "in sequence"? How do you test the sequence? Please show … | |
Re: 1) Choose the package for your SERVER's operating system. 2) Regarding processing time, there is no difference as far as I know. Use MyISAM tables for optimum speed and InnoDB for relational integrity (foreign keys). 3) The Mysql manual on their site is fairly complete regarding "all the queries." For … |
The End.