10,940 Topics

Member Avatar for
Member Avatar for darkiel21

<?php echo "<html> <head><title>comment box</title></head> <body> <hr width=1000>"; require('connect.php'); if(isset($_POST['submit'])) { $name = $_POST['name']; $comment = $_POST['comment']; echo "<font color=white><center>"; $result= mysql_query(" INSERT INTO COMMENT (name,comment) VALUES ('$name','$comment')") or die(mysql_error()); while($row = mysql_fetch_array($result)) { echo "<tr> <th>ID</th> <th>Name</th> <th>Comment</th></tr>"; echo "<tr>"; echo '<td>' . $row['name'] . '</td>'; echo '<td>' . …

Member Avatar for karthik_ppts
0
663
Member Avatar for maverick420

[QUOTE]I'm trying to list user who was used their 80% of allowed quote on SQL Plus Can you run [B]dirquota quota list [/B]command on SQL PLUS? Any help will be much appreciated!! Thanks :)[/QUOTE] [CODE]dirquota quota list/minused: 80%[/CODE]

Member Avatar for debasisdas
0
61
Member Avatar for tahirkhanafridi

Hi friends! i have a drop down combo box which holds names of persons with php mysql order by asc query like a's name put in 1st and after b's and c's and in last it shows z's name now i want that if it will show tahir name in …

Member Avatar for pritaeas
0
167
Member Avatar for laura301019

$dbQuery="select id, name from artists where name like '$keyword%' order by name asc limit 15"; $dbResult=mysql_query($dbQuery); echo mysql_num_rows($dbResult)."\n"; while ($dbRow=mysql_fetch_array($dbResult)) { // for each artist, return the number of albums belonging to that artist // use a separate query here to obtain the number // return the number after the …

Member Avatar for Biiim
0
422
Member Avatar for Ctechnology24

Guys I am having a problem on how can I display array of records using mysql_num_rows, I cant use mysql_fetch_array because the format like this [CODE]$row['MR_no'];[/CODE] that encloses the name of the field inside brackets in my SQL codes this is my codes: [CODE]<?php $username = $_SESSION['username']; $query = "select …

Member Avatar for Biiim
0
219
Member Avatar for momonq1990

please help me to this issue. its driving me nuts for an hour :( Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in /hermes/bosweb/web033/b336/ipg.asiahomecom/tile/tilesCollection.php on line 16 my line 16 code: while($row=mysql_fetch_array($a)){ my code.. --------------------tileVerification.php---------------------- <?php session_start(); if (!$_SESSION['user']){ header('location: tiles.php'); exit(); } ?> ---------------------connectionIn.php------------------------- $con = …

Member Avatar for momonq1990
0
96
Member Avatar for himanshu.1691

I have a project in which i have two roles : Student Teacher I have already created a login page but i cant figure out how to redirect them to different pages according to their Roles...

Member Avatar for broj1
0
132
Member Avatar for JukesK

Hey got a big issue i need to resolve if i have a table that records two distinct values entered by user.. NC001 OR TE001 Equipment_id | Serial | location -------------------------------- NC001 | if i have a php based form how can i tell it that if a user select …

Member Avatar for smantscheff
0
196
Member Avatar for oteheddy

Hello, Pls i developed a php application and i would like to limit the number of row entries into a table in my database and the number of rows displayed from that table. i am a beginner:$

Member Avatar for smantscheff
0
116
Member Avatar for Motifaithed

Hi All, I'm working on a database wherein I want to input the current date into existing table upon the user enter his pin. I'm having a hard time to make it work here is my code. [CODE] <?php $result="SELECT * FROM profiletable WHERE (firstName='$_POST[assetSearch]' || lastName='$_POST[assetSearch]' || IDNumber='$_POST[assetSearch]')"; $q …

Member Avatar for veedeoo
0
179
Member Avatar for bflack

I've created this function and I wonder if ever I COULD USE VARIABLES IN reading column values on database table. [CODE] function vote($column, $imgid)//the $column stands for a variable handling a string I've passed from my previous call. For now I am setting it as a string named "likes" which …

Member Avatar for scaiferw
0
127
Member Avatar for jeyjey88

Hello !! I need help fot the following situation: I have 2 tables: test1 and test2: each one have the same columns name: data test1: column data values (black, white) test2: column data values(white,black,orange, yellow) what sql sentence i can use to show only the values (orange, yellow) the difference …

Member Avatar for jeyjey88
0
102
Member Avatar for anthonyjpv

After INSERTing record(s) to payments_table (from paypal IPN), $query = "SELECT sum(payments) FROM payments_table WHERE customer_id='{$customer_ID}'"; $result = mysql_query($query); //get the value from result here $query = "SELECT customer_id FROM discounts_table WHERE customer_id='{$customer_ID}'"; $result = mysql_query($query); //if row > 1 //loop until reached a certain condition THEN genarate a NEW …

Member Avatar for anthonyjpv
0
103
Member Avatar for anthonyjpv

Hi! I have a table for payments what I want to accomplish is: once a certain customer Id reached a certain amount by his accumulated payment, it will trigger an insert into statement to my discount table to generate a code specifically for him. i understand thats trigger is only …

Member Avatar for anthonyjpv
0
4K
Member Avatar for baig772

Hi all I have following table structure [CODE] pk_cat_id(int) cat_name(varchar) cat_desc(text) fk_cat_id(int) [/CODE] table is self related as one to many i want to select cat_name, cat_desc and parent_cat_name() i.e. from fk_cat_id, how i can get cat_name

Member Avatar for baig772
0
107
Member Avatar for rahulroshan

Hi I am trying to cross join 3 tables and use the values from this to calculate cumulative Accuracy for each student. But I am missing some students name when they dont have values in one of the tables. Eg: [CODE]mysql_connect(localhost,$username,$password); @mysql_select_db($database) or die( "Unable to select database"); // to …

Member Avatar for smantscheff
0
575
Member Avatar for fabzster

Hi We have a competition running that I would like to automate getting the results with PHP from my MYSQL DB. I can run a query on the Database to get the following results Consultant1 20 sales Consultant2 10 sales Consultant3 5 sales Consultant4 1 sales Consultant5 3 sales Consultant6 …

Member Avatar for fabzster
0
302
Member Avatar for afrogfx

I'm Beginner. I need help, please. I am having a small problem in the script I am have in this script ( admin folder) Add contain articles (This page is working to add threads only) My problem in the Page (read_mor.php) i make a query with the database to bring …

Member Avatar for afrogfx
0
6K
Member Avatar for muralibobby2015

Hello, i have a problem with my query. any body give suggestion please. i have two tables named as "users" and "userimages" in the users table there are 1)userid (primary key) 2)name 3)subscription package (Brong or gold) and in the next table "userimages" fields are 1)auto_id 2)userid (foreign key) 3)image …

Member Avatar for karthik_ppts
0
124
Member Avatar for reyeskai

Please help me i having this problem, Current is my code: error at line "if(mysql_num_rows($result)!=0)" function getNewID($init,$field,$table) { $num = rand(1,100000000); $act_id = $init.$num; $query = "SELECT $field FROM $table WHERE $field = '$act_id'"; $result = mysql_db_query("ssimage_db", $query); if(mysql_num_rows($result)!=0) { $exist = true; } else{ $exist = false; } while($exist) …

Member Avatar for Matthew N.
0
122
Member Avatar for newbie14

Dear All, I have a system with the web server(apache) and db(mysql) server install on separate machines. So at times when the traffic is high I can not access my system. So first I would like to know where is the error and where is the error log file will …

Member Avatar for No woman No war
0
380
Member Avatar for Ctechnology24

can anybody help me how I can use four tables at the same time with different conditions to fetch records from my database? this is my sql code that im trying to modify because this is only for two tables: [CODE] <?php session_start(); if (isset($_SESSION['username'])) { include("database.php"); $username = $_SESSION['username']; …

Member Avatar for Ctechnology24
0
230
Member Avatar for VanHackman

Hi Guys, I willing to hear your suggestions and advice regarding a problem of DB design in MySQL. The situation is that I need to develop a DB design which brings High Performance under the following conditions: + There will be 10000 users that will consump and generate data. + …

Member Avatar for Biiim
0
157
Member Avatar for sammry

lastlogin is getting saved as time() in my mysql table and it is varchar mode. querying the database to send out emails to remind my users that they have not logged in from past 30 days SELECT * FROM members WHERE lastlogin = DATE_SUB(CURDATE(), INTERVAL 30 DAY) i tried with …

Member Avatar for sammry
0
173
Member Avatar for newbie1234

Hi friend, I want to use connector for mysql data base. I am follow this page [url]http://dev.mysql.com/tech-resources/articles/mysql-connector-cpp.html[/url] But it seems hard . Is there any other tutorial present. Please let me know.

Member Avatar for thines01
0
110
Member Avatar for Resentful

This is something I can't find any data on. I've got two database. Database one has a list in it. Database 2 has a list in it as well. I am needing to delete all the entries from database 1 that database 2 also contains. So if database one had …

Member Avatar for Resentful
0
92
Member Avatar for magicmarkuk

Hello again I have two questions regarding the REPLACE command. The first query I am running is [CODE]update phpbb_posts set post_text = replace(post_text, '[del]', '[ b][ i]') update phpbb_posts set post_text = replace(post_text, '[/del]', '[/i][/b]')[/CODE] Note - in the above code I have had to add a space before the …

Member Avatar for smantscheff
0
276
Member Avatar for gopi17

Heyy guys, need some help here...the thing i'm suppose to do is, update a value for a single row, but currently its updating the value for all the row... [CODE] <?php session_start(); $host="localhost"; // Host name $username=""; // Mysql username $password=""; // Mysql password $db_name="test"; // Database name $tbl_name="testing3"; // …

Member Avatar for gopi17
0
99
Member Avatar for Shodow

why is it sometimes i get an error? it doesn't highlight the error [B]CODE[/B] [CODE]Dim SqlQuery As String = "Select UserName from Login" Dim SqlAdapter As New MySqlDataAdapter Dim SqlCommand As New MySqlCommand Dim Ds As New DataSet Dim i As Integer With SqlCommand .CommandText = SqlQuery .Connection = sConnect …

Member Avatar for Shodow
0
541
Member Avatar for pjh1985

Hi, I am trying to transfer values in one table to a new table with a different structure. The current table has 3 fields id, content_id and value and for each content_id there are several records. I would like to transfer the values for each content_id to just 1 record …

Member Avatar for smantscheff
0
193

The End.