10,946 Topics
![]() | |
![]() | Hey there. I am attempting to create an administrator option, which would be the following: When the administrator checks the checkbox, it would automatically save it to the db. Usually update it. [CODE] while($row = mysql_fetch_array( $retrieve )) { echo "<td><input type=\"checkbox\" name=\"noutate\" onClick=\"this.form.submit();"; if (isset($_POST['checkbox'])) { $update ="UPDATE content … |
Hi guys, mysql noob here. :) So here's my problem. I have 2 tables, Order(order_id,product_id) and Product(product_id,product_name). For one order, I can have many products. So my question is how can I auto increment order_id? When I insert multiple products in the order table, it generates an order_id for each … | |
I'm looking for a solution. I am developing a "user profile" php file which will render to the current user their profile information. The info rendered and seperated into different divs (styled with css) will be in the form of html/php. However, if no information exists in a specific field … | |
hi to people who like starting with <?php and finishing with ?> I can always help your php and mysql works.when you need a help just add me to your msn and request a help [email snipped] friendship is first and the second must be helping each other. my name … | |
I have a database containing records which I want to edit. I populate a list box which gets populated with the records in the database and I select and click on one of the records for editing. I find that I am able to select the record from the listbox, … | |
Hi all, i want to know that 'Is mysql support chinese language?' If yes then any changes require in configuration? My site is in english. Let if any user have inserted their information in Chinese and if anyone search using Chinese keyword, then it should match with mysql and if … | |
This doesn't really have anything to do with Php but I'm following a php tutorial so...I've NEVER used any database system before... Anyway, I'm following this tutorial, [url]http://buildingbrowsergames.com/2008/04/15/designing-your-database/[/url] I'm up to the part where your making the user sql table in the tutorial. I have no idea where to input … | |
Hi, Im trying to install a mysql service for a noinstall mysql. At the same time I want to set the variable log-bin-trust-functions-creators=1 but it throws this error 100506 10:49:15 [Warning] '--skip-locking' is deprecated and wil be removed in a future release. Please use '--skip-external-locking' instead. This is how I … | |
[QUOTE]Hi all, i am working on php. so now i need to echo the value obtained by mysql. so can any one... thank u. [/QUOTE] [CODE]$sql2="select reportingto from users where username='$_SESSION[username]'"; mysql_error(); $result2 = mysql_query($sql2);[/CODE] | |
Hello, I have two different tables I need to extract data from. They are linked by a number, that is to say the value of the field 'number' in table 1 is the same value as the value of the field 'num' in table 2. I can select data from … | |
Okay, fairly straightforward mysql insert from a form, the insert works fine but i wanted to have it check for duplicates first and kick out an error if the name already existed in the table. That said, I worked out a few errors in the jsp, and have it down … | |
I'd like to start using databases with my websites. I use PayPal shopping cart now and want to automate adding sales items for my customers product. It seems like PHP/MySQL is the easy answer. Am I right? I don't really want to build a whole cart just most of a … | |
What features does PHP/MySQL provide to deal with concurrent systems? E.g, If I have a table, and I only want to allow one user to update at any one time. I want to put a lock on the database until the update is complete, then once that request is processed, … | |
G'day, I've just been cleaning up some of my queries, and have opted to use a MySQL view for simplification of my queries, as i was using multiple queries to get the values that i wanted. However, I cannot quite figure out how to iterate through the view. My view … | |
I'm sitting my CMA next week, and am rather embarrassed that i have to ask this. i have some java code, that i'm looking to clean up. and in it is my SQL queries. I've tried running joins on my tables but none quite get the effect that i've achieved … | |
I am trying to create a plan for users based on their top 3 choices. I want to display results all together on a results page. I have database populated and form (check boxes) created. I cannot seem to put the two together. I want them to choose 3 choices … | |
Hi I'm just trying to input two string variables into 2 fields of a database that are VarChars. [CODE] $name = "jear"; $pass = "jartt2"; $query = 'INSERT INTO `user` (`id`, `name`, `password`, `char_name`) VALUES (NULL, '$name', '$pass', 'test')'; $result = mysql_query($query); [/CODE] This is the snippet of code that … | |
This is my code, as seen here: [url]http://pcafansa6.hosticks.com/episode1.php[/url] [CODE]<?php /*********************************** * PhpMyCoder Paginator * * Created By PhpMyCoder * * 2010 PhpMyCoder * * ------------------------------- * * You may use this code as long * * as this notice stays intact and * * the proper credit is given to … | |
Hi everyone, Ok, what I want to do is display a url that's stored in my database within an iframe when the specific record is selected. The code I had to display the record correctly is: [code] <?php $conn = mysql_connect(HOST,USER,PASS); $db = mysql_select_db("***") or die( "Unable to select database"); … | |
Safari can’t open the page because the server unexpectedly dropped the connection. This sometimes occurs when the server is busy. Wait for a few minutes, and then try again. When I try to post the form with Firefox i just get a black page. This problems started when i changed … | |
hi, i have the following table: +------------------+-------------+------+-----+---------+----------------+ | Field | Type | Null | Key | Default | Extra | +------------------+-------------+------+-----+---------+----------------+ | IpAddressesID | int(11) | NO | PRI | NULL | auto_increment | | PhysicalServerID | int(11) | NO | | NULL | | | VmID | int(11) | … | |
Hi i just did some codoing and heres the error i get when i try to use my register forum [code] Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource in /home/rpimager/public_html/RPImager/register.php on line 32 Account created. [/code] Here's the docs that i use it for. why i … | |
Hi all. I'm new with jsp and i'm just looking for create a login solution. I use a mysql database and what i'm looking for is what follows: Make a query to my sql database and then insert the output of one field in a variable. I need this variable … | |
Hi Does Anyone know how to display a table based on user selected fields? In my search box, once the user searches lets say all the female students, all the female students will show with all the fields of that particular table. then if need to print a report i … ![]() | |
Hey everyone, Um, I've been working with PHP and MySQL for a few weeks, and to store text I've always been stripping anything but alphanumeric characters, which has worked fine until now. For my next project [I want to create a simple CMS/forum for my website], I need to store … | |
I was looking to make a VERY simple PHP/MySQL loginish username site, as an exercise, when I came across the problem of storing info on the users. I am very new at this (hence the need for an exercise), so I was wondering if anyone could direct in the right … | |
Hi is it possible to count days between columns, something like [CODE]datediff(date_finished-date_started) as 'days'[/CODE] only datediff works just with actual dates, and I'd like to have the days number for every row counted automatically with the rsults in a new temporary column'days'; I hope it makes sense. Please could you … | |
hi all i know that to be able to bakckup with mysqldump i need to type mysqldump -u [username] -p [password] [databasename] > [backupfile.sql] i was just wondering how can i pass that command from a windows app using c# | |
A new site that I have to work with requires me to use putty to connect to the site if I want to work remotely as opposed to logging in to their phpMyAdmin to manipulate my data.. I am unfamiliar; please read that has having no knowledge of how to … | |
Hello guys, i'm having an issue with updating the record in my database. everything seems to work well except that whenever i try updating the record via the mysql update procedure, it just returns with no errors and the record is not update. i tried echo'ing the $result to see … | |
Can someone look at this and tell me why I'm getting an empty tar? [code] #!/bin/sh #### mysqldump --opt --user=[my username] --password=[my password] | tar cvz > backup.tar.gz #### echo | mutt -a backup.tar.gz -s \"Database Backup\" [my email] #### rm backup.tar.gz #### [/code] Thanks! | |
# Query_time: 6.081227 Lock_time: 0.000085 Rows_sent: 1 Rows_examined: 1339 SELECT COUNT(id) FROM `article` WHERE `category` = 'shkrime-te-perkthyera' Is there a way to speed it up. Should I index the category column? Or what do you suggest? I use this query to get the number of articles on that category! | |
Hi, I am trying to set up a section on a site where the results that are shown come from a table. I want to get the number of the 'current_round' then subtract 1 from it and use that value. I have looked up MySQL dev site, and assume that … | |
Hi, I am trying to display some results where one column is equal to another column in a table. End goal: display all the results where the round and current round are the same number for every team in the table. the number of teams will change as the number … | |
hey i have two tables in a database that i will like to join in the below code, but i cant. i can only use one table at a time. $result = mysql_query("SELECT name,price from products WHERE itemid = '$id'",$cxn) or die ("Unable to retrieve information from database"); if i … | |
Hi, I want a MySQL stored procedure which can parse an excel file and save it in the csv format,after which the values in the file can be imported into a table. Kindly help me with a solution for this asap. Thanks, Narayana | |
Hi, So basically I have a php file that fetches database records and displays it. Now i would like to add the ability to edit each record using lightbox. here is the main file [CODE=PHP] <?php $username="root"; $password=""; $database="lhs_anniversary_banquet"; mysql_connect("localhost",$username,$password); @mysql_select_db($database) or die( "Unable to select database"); $query="SELECT * FROM … | |
hi all im looking to use a select mysql query - but im trying to query the database against a users logged in sessions. I have the sessions working correctly but I am unsure how to included the session data in my sql select query. here is my users session … | |
I am getting the following error Fatal error: Call to undefined function mysql_connect() in C:\Inetpub\wwwroot\valid.php on line 4 Using php and my sql on localhost | |
hello. is there a way which i am able to cast/ convert my substrings into integer? This is what i have been trying to do, apparently, it does not work. SELECT campaignmonth CAST(campaignmonth, substring(campaignmonth,1,1)as Jan) FROM campaign a; thanks | |
Hi, Ive been at this all weekend and can't figure it out.... I need to take it name and 3 results via a form and store this in a mysql database - done. Then I need to print on screen via php who got the highest score. The highest score … ![]() | |
I've got my pagination script working, but now I need help trying to get it to extract data from 2 different sources. The episode data is stored in table episodes, whilst the main table (where the info on airdates for episodes is stored in epdata2). This is my code: [CODE] … | |
Hi all ! I 'm a newbie in SQL and has just install the Oracle 10g Express Edition. When using its SQL Command in the Web-interface, I took an error with the GROUP BY, as follow : First, I create a table DEPARTMENT, here 's the code : [CODE] CREATE … | |
Hi all, I have been running errors too much that I realized that I have learned 'bad' behaviour in writting PHP query. So I decided to change. Please tell me what is good behaviour of writting queries that involve PHP variables as well as functions like one below. [CODE=php]$query = … | |
Hi, i'm not really sure how to explain this. I have a table with a lot of places sorted by date, all connected to a MySQL database. I'd like the table to update automatically everyday and remove the top ones where the date has passed so that the table only … | |
Doing a system in drupal using php and mysql. Want to integrate a function for reporting - that is print out watever search result in the search page which displays in tabular form. please help. i have only heard of jasper reports. is there something simpler? if so wat n … | |
Doing a System in Drupal - coding with php and mysql - want to know how i can integrate jasper reports to it so i can generate reports at the click of a button.. does anyone know? please help.. | |
Hi folks, [COLOR="Green"] I have a MySql table...which has 4 columns say sid pid tid data 1 abc 2 def 3 ghi 4 jkl - - 10 xyz 1 dfsf 2 sdfs [/COLOR] I want to convert column name 'data' into multiple rows i.e. 1 2 3 4 5 --- … | |
I have a table and I want to start the select with the 20th row. How do I do this? Does conditionals work on "limit" | |
I'm doing my assignment, and I can't figure out how do it. For instance, I have to decrease the prices in a "movie" column by 3%...how do you update the table like that? So, would you say: UPDATE table_name SET PRICE = (PRICE * 0.97); ? |
The End.