10,940 Topics
| |
Hello everyone, I have a table that i want to limit to 10 results per page and have a simple pagination script to generate the next 10 results. I have tried many different options, but alas it does not work. here is what I have so far. <tbody> <? //specify … | |
ALTER FUNCTION [dbo].[customers_udfMin2] ( @decission tinyint ) RETURNS int AS BEGIN -- Declare the return variable here DECLARE @min int Declare @default int = 10 -- Add the T-SQL statements to compute the return value here if (@decission = 1) Begin SELECT @min = MIN(customers.cus_id) from customers End else RETURN … | |
Ok, new question... I need to get data from one mysql row, set it as $ad The following code will convert it to readable date format. <?php function adConvert ($ad) { $seconds_ad = $ad / (10000000); //86400 -- seconds in 1 day $unix = ((1970-1601) * 365 - 3 + … | |
display city_name using two tables. I have written two queries but unable to display the results. First Table name is tbl_city and it has id,state_id,city_id,city_name. Other table name is tbl_states and it has id,state_id,state_name $state_id=$_REQUEST['state_id']; $query="select c.city_name FROM tbl_city AS c,tbl_states AS s where c.state_id='$state_id' AND s.state_id='$state_id'";(two tables using alias) … | |
I need to get the name of the table with the biggest number of rows, I can find the biggest number of rows with function count and than function max, but i don't know how to see from which table is that maximum, can anyone help? tnx | |
What's the difference between char and varchar in phpmyadmin ? I am trying to decide whether to use char or varchar for name for example. | |
| |
I want to start and stop MySQL on Windows? How do I do that? | |
Honestly am writing an application and am stuck at this point. problem is am writing an asset derpreciation application and i am calculating for Monthly Depreciation,End-of-year value ,Accumulated depreciatio.I want get the results of the values in this form in my jTable when the calculation is done. for example when … | |
Hello guys, my turn to ask a very simple question. I already have a Mysql DB with querys working great. I import data from Active Directory server, and one of the values is State, enabled or disabled, etc. But this values came in a form of code: 512 = Enabled … | |
this is my php code,it works properly before inserting,can it be the fact that i have attatched a photo to my form? the other problem is,i dont know what type is photo for my xampp database,i left it a VARCHAR, the error i get is: Parse error: syntax error, unexpected … | |
I'm trying to display some records which meet some certain criteria. That works fine, but I also want to retrieve the total amount of orders. These are all located in the field 'Amount' from the Orders table. So if record 1 has got '22' in it's amount field, and record … | |
am trying to export data from mysql db to excel format, but the excel file i get is damaged. i get two varibles by $_GET, and run a search, and then creates the excel file based on the results... `$p_na = $_GET['p_na']; $svreg = $_GET['svreg']; include_once("classes/PHPExcel.php"); $result = mysql_query("SELECT * … | |
When I run: ---`mysql> SET PASSWORD FOR 'garrett'@'localhost' = PASSWORD('abc123');` I get: ---`ERROR 1133 (42000): Can't find any matching row in the user table` Also, when I run: ---`mysql> UPDATE mysql.user SET Password=PASSWORD('abc123') WHERE User='garrett' AND Host='localhost';` I get: ---`Query OK, 0 rows affected (0.00 sec)` ---`Rows matched: 0 Changed: … | |
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 'NOT NULL, CreatedOn DATETIME NOT NULL, ModifiedOn DATETIME NOT NULL, `StartD' at line 1 CREATE TABLE `billing`.`ebUsers` ( `UserID` INT NOT NULL AUTO_INCREMENT … | |
| I'm trying to do the following: 1. get username typed into the userField 2. make a SEARCH mysql_query with the username as a variable I'm having a hard time getting past phase 2 since mysql_query takes a const char* as the query string, and I can only get username as … |
drop trigger if exists update_asset; drop trigger if exists insert_asset; drop trigger if exists process_asset; delimiter | create procedure process_asset_calc ( in name varchar(50), in cost decimal(20,2), in life int(11), in whenacquired date, inout Months_Depreciated int(11), inout Accumulated_Value double(2,0), in residual_value double(2,0), inout Monthly_Depreciation double(2,0), ) BEGIN set Months_Depreciated = … | |
I'm working on making a user maintenance system for my class, I have created the add/delete user portion but as for the edit portion I am completely stumped. So far I have created the form but what I want to do is be able to hit find user and then … | |
help i with inno script i am finished with the prerequisite problem of framework my only problem is that after setup my sql files will be automatically imported | |
$query="SELECT * FROM history WHERE p_na LIKE '$p_na%' AND svreg LIKE '$svreg%' IN (SELECT * FROM history WHERE cdate BETWEEN '2013-09-12' AND '2013-12-12')"; $sql=mysql_query("$query"); am searching for data LIKE a and LIKE b that falls between to dates. I thought a sub query will be the best method, but its … | |
I am learning JSP, and have developed a books application, which displays the book-id,title,author and price. There are seperate text box for each of the field, whenever the user fills the form and hits submit button the value must be inserted into my database. If I try to submit it … | |
I am building a cms I want to iplement the ability to hide pages. I have a row in mysql named hidden which stores the values 1 and 0. 1 will allow the page to be shown and 0 will hide it. The defalut value is set as 1. When … | |
Helloo, Good day Everyone, Can I anyone help me? Here is my problem. I am newbies in C# development, I am Interesting to learn, searching to google and go to youtube, download lynda tutorials it's help a lot of me. But I'm on the problem that I can't not resolve. … | |
hi, in the mysql we can fetch data and store them into variables, like the code below: if (mysql_num_rows($userquery) != 1) { die ("that member could not be found!"); while($row = mysql_fetch_array ($userquery, MYSQL_ASSOC)){ $first_name = $row['first_name']; $last_name = $row['last_name']; $email = $row['email']; $password = $row['password']; $sex = $row['sex']; $dbusername … | |
Hello! I am editing my website to make it more updated and have created a new couple of pages which use my Database. I created the script and the databases (and tables) and everything was working OK... until somehow the tables have got partially deleted. I say partially because if … | |
i want to write a function which calculates the Monthly depreciation and accumulation of an asset but i am having difficulties writing it to calculate and insert it into my datebase.I will appreciate the help private double getAccumulation(){ double Accumulation = 0; double Monthly_Depreciation; int Estimated_Useful_Life = Integer.parseInt(eul.getText()); double Cost_Of_Acquisition … | |
Hi, I begin study shell programming. I need a basic tutorial or ebook about shell script control MySQL databases (not shell command) please hellp me! | |
hello all I am a beginner... I want to move a wordpress site from a local computer to live server... live server: plesk parallels I followed some tutorials and it says: you must create a new mySql database on server... ok I went to parallels plesk panel and I created … |
The End.