7,368 Topics

Member Avatar for
Member Avatar for lukas.vandendijssel

Hello, My script uses the user 'www-data' (my webserver) when connecting to the MySQL Database, while I tell it not to. <?php include ('config.inc.php'); $connection = mysql_connect($host, $user, $password); mysql_select_db($database, $connection); $shorturls = mysql_query('SELECT shorturl FROM `' . $prefix . 'urls`'); $shorturl = rand(100000, 999999); foreach(mysql_fetch_array($shorturls) as $row) { if($row['shorturl']==$shorturl) …

Member Avatar for Larry_Singleton
0
391
Member Avatar for atikah8890

Hi all. I hope I chose the forum to post in, it's an in between kind of question. I'm looking into options to develop my final year project. It's a formative assessment of a theoretical course to grasp students' understanding. The focus is on the ability of students to relate …

Member Avatar for atikah8890
0
441
Member Avatar for Noth

Hi guys. I'm just wondering why this function always returns true, no matter what the $user_id is. The $user_id variable is determined by what is retreived from the $_SESSION. I am well aware that mysql_* functions are being depreceated etc, no need to tell me :P Thanks guys! function user_mod() …

Member Avatar for veedeoo
0
197
Member Avatar for icohibari

I have quiz ID(Q1 for example) and below is the number of items in that quiz. My problem is, I need to display a dash when query cannot find a record in my database, if there is a record it will show up and the missing records will be filled …

Member Avatar for pritaeas
0
209
Member Avatar for AARTI SHRIVAS

i currently using mysql for database i want to use mysqli can any one tell me any other php server is required for it or i can use it in my bitnami wampstack 5.3.17.0 apache server.

Member Avatar for diafol
0
208
Member Avatar for joshl_1995
Member Avatar for joshl_1995
-1
359
Member Avatar for joshl_1995
Member Avatar for diafol
0
222
Member Avatar for garyjohnson

I know there are other post conserning this but they dont seem to help me. When I run the varaible `$results` through the function `Mysql_num_rows()` it returns as an error saying its not a valid result. Also same for the `mysql_fetch_array()`. function results(){ if ($_POST['search'] != "") { $search = …

Member Avatar for garyjohnson
0
209
Member Avatar for chira.laura.9

If I have relation schema R(A, B, C, D, E) with functional dependencies: AB->C, CD->E, C->A, E->D: a)find all the (minimal) keys for R b)state the normal form for R and describe functional dependencies that violate higher NF c)decompose R into 2 (or more) relations that are in highest possible …

Member Avatar for peter_budo
0
95
Member Avatar for adishardis

I'm trying to get an xml file from an ftp and then insert select data into mysql db. I'm shooting in the dark but from googling this is what i've tried so far: $curl = curl_init(); $file = fopen("import.xml", 'w'); curl_setopt($curl, CURLOPT_URL, "ftp://company@company.company.se/company/import.xml"); #input curl_setopt($curl, CURLOPT_FILE, $file); #output curl_setopt($curl, CURLOPT_USERPWD, …

Member Avatar for adishardis
0
475
Member Avatar for adishardis

Hi, I, getting a new xml file everyday to one of our external ftp servers. I want to get that file and then insert select data into my mysql. What I'm thinking is that I would use curl to get the file, then simplexml and then insert into database. But …

Member Avatar for adishardis
0
216
Member Avatar for chuyauchi

I have three tables: collections [clientID][isbn] books [title][isbn][author] clients [cliendID][firstName][lastName] I am making a seach functon on php. The function will search the clientID and display the name (from the clients table) and what book that client has (fro collections table). What should I do for the query? $query = …

Member Avatar for LastMitch
0
84
Member Avatar for garyjohnson

I am making a mysql query that gathers comments for a user, it works properly, I connect to the database and recieve the comments for a user, but it is not showing the first comment for the user. Here is the code function comments(){ //connect to db connect_db_members(); //start query …

Member Avatar for garyjohnson
0
303
Member Avatar for karo.toapanta

CREATE TABLE `camioneta` ( `codigo_vehiculo` varchar(20) NOT NULL, `cabina` varchar(50) DEFAULT NULL, `capacidad` int(11) DEFAULT NULL, `num_puertas` int(11) DEFAULT NULL, PRIMARY KEY (`codigo_vehiculo`), CONSTRAINT `fk__camioneta__codig__300424b4` FOREIGN KEY (`codigo_vehiculo`) REFERENCES `vehiculos` (`codigo_vehiculo`) ON DELETE CASCADE ON UPDATE CASCADE ) ENGINE=InnoDB DEFAULT CHARSET=utf8; /*!40101 SET character_set_client = @saved_cs_client */;

Member Avatar for LastMitch
0
175
Member Avatar for Noth

Hi everyone. I'm trying to verify whether the variables $username and $password_recovery (both are unique - impossible for them to be the same) both come from the same row in the rable 'users'. This is the query I am using: return (mysql_result(mysql_query("SELECT COUNT(`user_id`) FROM `users` WHERE `username` = '$username' AND …

Member Avatar for urtrivedi
0
195
Member Avatar for dinhunzvi

i have two tables the following structures. CREATE TABLE `tblbranches` ( `branchID` tinyint(3) unsigned NOT NULL AUTO_INCREMENT, `branchCode` varchar(30) NOT NULL, `branchName` varchar(30) NOT NULL, `regionID` tinyint(3) unsigned NOT NULL, `branchAddress` varchar(400) NOT NULL, `cityID` smallint(5) unsigned NOT NULL, `countryID` smallint(3) unsigned NOT NULL, `branchContact` varchar(50) NOT NULL, `branchFax` varchar(20) …

Member Avatar for dinhunzvi
0
191
Member Avatar for davecoventry

I have a client who deleted users on his database. Is there any possibility that the records have been flagged for deletion rather than physically deleted? If so how do I recover them? It's a Joomla system and there are no backups. Thanks. (Yes, I know).

Member Avatar for pritaeas
0
113
Member Avatar for Szabi Zsoldos

Hi guys, I have a database with hundreds of persons and doing a live-search with ajax. And I have this query. The idea is that I do have the test line in the db but it has a status 0, but it is keep showing up in the results even …

Member Avatar for VR4Creativity
0
103
Member Avatar for showman13

I have a table of withdrawal requests that has a datetime field called 'create_date' I need to query that table to see if a member has submitted a withdrawal request within the past 24 hours If they have, I need just the most recent record within 24 hours that matches …

Member Avatar for showman13
0
133
Member Avatar for ebc3142

I'm trying to use this code to populate my drop down menu from a mysql table: <select name="fileselect"> <?php $pdo = new PDO('mysql:host=localhost;dbname=contisec_portal', 'root', ''); $stmt = $pdo->prepare("SELECT dateid FROM date_header"); $stmt = $pdo->execute(); while ($row = $stmt->fetch(PDO::FETCH_ASSOC)) { echo "<option value='" . $row['dateid'] . "'>" . $row['dateid'] . "</option>"; …

Member Avatar for diafol
0
6K
Member Avatar for dashawk

Hi guys, I have a php code that displays a list of dishes where a user can check on those dishes and then save the selection to the database. My code works find when selecting and saving the data. But the problem is that when I try to uncheck one …

Member Avatar for dashawk
0
262
Member Avatar for joshmac

I am using a framework, and I am having an issue with getting the results of this particular associative array. All others work except for this one and I am not sure why. This one only returns one result. Here is what I have in my model: public function listStats($id) …

Member Avatar for joshmac
0
225
Member Avatar for Some-Jackass

In my MySQL database I have my regular tables, and a couple of VIEWS. Everything runs like clockwork, until I remove Remote Access to the database. I cannot access any of my VIEWS. Accessing any regular tables still work 100%. The thing is, the PHP script accessing the VIEW is …

Member Avatar for Some-Jackass
0
269
Member Avatar for mrhankey

hi, i am adding in a basic accounts table to my system. what i need to know is what is the best way to insert repeat payments. such as rent monthly? many thanks

Member Avatar for adam_k
0
182
Member Avatar for amweasel

1. Can ZoDB replace MySQl or both of them serve different purposes? 2. If yes, is ZoDB as good as MySQL for handling a dynamic website?

Member Avatar for amweasel
0
193
Member Avatar for jasonmark238

Hi frinds. What is normalization and what is BCNF. Please give me brief description with simple example. Please help me. Thanks & Regards Jasonmark

Member Avatar for AARTI SHRIVAS
-1
178
Member Avatar for Szabi Zsoldos

Hi guys, I'm working on a holiday scheduling app and I was wondering that if a person wants his holiday for example 10 days. id uid data1 data2 ore tip_concediu ts 7 244 2013-01-25 2013-02-05 3 2 2013-01-25 16:08:35 How would it be possible that I could track the holiday …

Member Avatar for Szabi Zsoldos
0
349
Member Avatar for mrhankey

hi, i have looked on net all over and cannot find an occupations table. basically for my application i need a table of occupations so if anyone has this in sql or excel please can you post up here? many thanks

Member Avatar for mrhankey
0
160
Member Avatar for Vincentas

Hi there, Can someone tell me how do i upload the data created in mysql command line client into the Mysql server, I mean, i have created some tables using mysql command line client in my system, it is accessible only to me. How do i upload it into the …

Member Avatar for Vincentas
0
79
Member Avatar for s0wh4t

Hi. Well, i'm trying to add new data to mysql, <input type="text" name="name"/> example: Billy Boy when I check mysql table, it shows "BillyBoy" How do I fix that error? Thank you.

Member Avatar for s0wh4t
0
228

The End.