andydeans 0 Junior Poster

can view all myisam tables and data but not the innodb tables

andydeans 0 Junior Poster

no this is a mysql database not mssql

andydeans 0 Junior Poster

hi there,

i have a vps which has crashed and now have a new build of mysql and server.

the old drive is mounted and i can access all the web files from the old drive an have download the mysql raw files from the var/lib folder.

i uploaded to the new site mysql folder and all the isam tables are there with data however the tables that were in innodb are not. the are listed on the left hand side in phpmyadmin but cannot view the data. can i restore this data at all from these files somehow or can i backup using putty from that mounted folder using a command at all?

many thanks

andydeans 0 Junior Poster

Not Navicat. It was exported out of php my admin that way.

andydeans 0 Junior Poster

hi,

thanks for this. i will check it out. in the meantime could you or anyone point me in right direction to where it would apply in this create view join?

i assume it is before the table that it does not matter has data in it or not?

cheers

andydeans 0 Junior Poster

hi,

i have just applied a view to my database and when tested works fine if their is a value from the tasks and allrenewals tables of "clientID" or clients_ClientID however i need to be able to view the entries even if the clientid or clients_clientid from the 2 tables is null.

i cannot seem to get it right and have tried changing the join around to 3 different combinations.

hope someone can help urgently.

CREATE ALGORITHM=UNDEFINED DEFINER=`web1local-local`@`%` SQL SECURITY DEFINER VIEW `calendar` AS 
select `p`.`TaskID` AS `TaskID`,'tasks' AS `Task`,`c`.`ClientID` AS `ClientID`,`c`.`App1FirstName` AS `App1FirstName`,`c`.`App1LastName` AS `App1LastName`,
`c`.`App2FirstName` AS `App2FirstName`,`c`.`App2LastName` AS `App2LastName`,`u`.`UserID` AS `UserID`,`u`.`FirstName` AS `Firstname`,
`u`.`LastName` AS `Lastname`,`p`.`TaskTitle` AS `Title`,`p`.`TaskDueDate` AS `DueDate`,`p`.`Completed` AS `NPW`,`p`.`ProductAssociated` AS `Product`,`p`.`TaskDescription` AS `Description`  
from ((`clients` `c` join `tasks` `p` on((`c`.`ClientID` = `p`.`clients_ClientID`))) join `users` `u` on((`p`.`Tasks_UserID` = `u`.`UserID`)))
where `p`.`Completed` = 'No' 
union select `p`.`Product` AS `Product`,'allrenewals' AS `Review`,`c`.`ClientID` AS `ClientID`,`c`.`App1FirstName` AS `App1FirstName`,`c`.`App1LastName` AS `App1LastName`,
`c`.`App2FirstName` AS `App2FirstName`,`c`.`App2LastName` AS `App2LastName`,`u`.`UserID` AS `UserID`,`u`.`FirstName` AS `FirstName`,
`u`.`LastName` AS `LastName`,`p`.`ProductID` AS `Title`,`p`.`ReviewDate` AS `DueDate`,`p`.`NPW` AS `NPW`,`p`.`ProductID` AS `Product`,`p`.`Provider` AS `Description` 
from ((`clients` `c` join `allrenewals` `p` on((`c`.`ClientID` = `p`.`ClientID`))) join `users` `u` on((`p`.`UserID` = `u`.`UserID`)))
WHERE `p`.`NPW` = 'N';

thanks

smantscheff commented: Andydeans should learn how to state a problem. It would clear his mind. +0
andydeans 0 Junior Poster

hi,

this is probably easy so hope someone can help asap.

i have an existing bit of code here:

<img src="images/<?php echo (($row_rsTimelineActive['ReservationFormSentToPP']==0)?'no.gif':'yes.gif'); ?>" >

instead of it being ==0 i want to be able to display no.gif if ReservationFormSentToPP is null and yes.gif if not null.

hope you can help.

many thanks

andydeans 0 Junior Poster

its ok i have managed to resolve by including a date and time picker in one as i was struggling to get finished.

if you could provide with anyway though for future reference i woudl appreciate.

many thanks

andydeans 0 Junior Poster

thanks.

here is the code i have:

$cal_rsRenewals->setRecordset("rsRenewals");
  $cal_rsRenewals->setField("ID", "TaskID");
  $cal_rsRenewals->setField("TITLE", "Title");
  $cal_rsRenewals->setField("DESCRIPTION", "NPW");
  $cal_rsRenewals->setField("START_DATE", "DueDate");
  $cal_rsRenewals->setField("END_DATE", "DueDate");

I want the START_DATE to be the DueDate and the TimeToCall column.

i tried adding in:

$cal_rsRenewals->setField("START_DATE", "DueDate", "TimeToCall");

but no joy.

the code you gave me, how could i impliement into my existing insert into table code:

// Add columns
$ins_tasks->setTable("tasks");
$ins_tasks->addColumn("TaskTitle", "STRING_TYPE", "POST", "TaskTitle");
$ins_tasks->addColumn("TaskType", "STRING_TYPE", "POST", "TaskType");
$ins_tasks->addColumn("Urgent", "CHECKBOX_YN_TYPE", "POST", "Urgent", "N");
$ins_tasks->addColumn("clients_ClientID", "NUMERIC_TYPE", "POST", "clients_ClientID");
$ins_tasks->addColumn("ProductAssociated", "STRING_TYPE", "POST", "ProductAssociated");
$ins_tasks->addColumn("TaskDescription", "STRING_TYPE", "POST", "TaskDescription");
$ins_tasks->addColumn("FurtherAction", "STRING_TYPE", "POST", "FurtherAction");
$ins_tasks->addColumn("Documents_DocID", "NUMERIC_TYPE", "POST", "Documents_DocID");
$ins_tasks->addColumn("Tasks_UserID", "NUMERIC_TYPE", "POST", "Tasks_UserID");
$ins_tasks->addColumn("Task_AddedByUserID", "NUMERIC_TYPE", "POST", "Task_AddedByUserID");
$ins_tasks->addColumn("TaskDueDate", "DATE_TYPE", "POST", "TaskDueDate");
$ins_tasks->addColumn("TimeToCall", "DATE_TYPE", "POST", "TimeToCall");
$ins_tasks->addColumn("Completed", "STRING_TYPE", "POST", "Completed");
$ins_tasks->setPrimaryKey("TaskID", "NUMERIC_TYPE");

thanks again

andydeans 0 Junior Poster

its ok, managed to solve it. syntax error higher up in code.

thanks

andydeans 0 Junior Poster

hi,

this is probably a simple solution but nothing is coming up in searches except date and time pickers.

i basically have a datetime column in mysql database.

i have an input field for my date part and i want to create a second input field in my form to allow the keying of the time.

the thing is i want the date and the time to insert into the same column, so not sure if i need to create a hidden field that puts the 2 together so when it inserts into the database as the one datetime?

not sure of this is correct of the code for this.

hope someone can help.

many thanks

andydeans 0 Junior Poster

hi,

yes i thought that would be the case as when i do a select query that is how i would type it however when create the view with ='N' it throws a syntax error.

does not create the view.

anyone else know how i add the where clause to match 'N' in my crete view? it works if i take that line out so i know the rest of the query works i just cant get it to compare to a value.

thanks again

andydeans 0 Junior Poster

hi,

i am struggling and it will prob be a simple answer but cannot figure it out at all today.

checked online but no use.

my to create my view i need to compare a column to a yes or no.

at the moment i have tried this but no joy:

where (isnull(`p`.`Date`) and (`p`.`True` = N))

I need the view to return only the true = N but cannot get this.

hope someone can help, sure you guys will.

many thanks

andydeans 0 Junior Poster

hi,

this is following on from a previous thread. i have looked around and openssl documentation is a bit unclear.

can it secure all sub domains?

i would like to use openssl to secure all sub domains and easily add them/manage via cpanel?

can anyone help guid me on this?

many thanks

andydeans 0 Junior Poster

thank you again

andydeans 0 Junior Poster

thanks for the help,

does views cause storage space on the database at all?

just when you mentioned views cluttering the database.

thanks again guys

andydeans 0 Junior Poster

hi,

i have a view in the database which queries about 6 tables to produce the results and works great.

however i need to create a view based on the info from this view along with data from another table.

when creating the view that queries the view and table is there anything i should know or should this work fine?

many thanks

andydeans 0 Junior Poster

i think the best way to do it is to just let them send the mail from their client as i have been asked if it all possible to email from the site from their company email address to clients. but obviously the users email domain is different from the website domain so it looks like it will cause problems and no way around.

thanks anyway

andydeans 0 Junior Poster

thansk for the help that sorted it.

had to take the s off minutes to make it MINUTE

thanks again

andydeans 0 Junior Poster

hi,

i want to add an end time in my query using my time to call column.

at the moment i have a time to call which will be the start time however i want to add timetocall as endtime which is 15 mins after the timetocall column.

i am syncing this to outlook that is why i need the two and at moment it is not possible to add another column to the existing database.

here is my query:

SELECT tasks.TaskID, tasks.TaskAdded, tasks.TaskType, tasks.Urgent, tasks.clients_ClientID, tasks.TaskTitle, tasks.ProductAssociated, tasks.TaskDescription, tasks.FurtherAction, tasks.Documents_DocID, tasks.Tasks_UserID, tasks.Task_AddedByUserID, tasks.TaskDueDate, tasks.TimeToCall, tasks.Completed, users.UserID, users.FullName, clients.ClientID, clients.App1FirstName, clients.App1LastName, clients.ClientUserID
FROM tasks JOIN users on Tasks_UserID = users.UserID LEFT JOIN clients ON tasks.clients_ClientID = clients.ClientID

not sure how to ADDTIME() to the timetocall and use this as an alias of "EndTimeToCall" ??

any help appreciated.

many thanks

andydeans 0 Junior Poster

yeah it is someting that would be great to have, the users would be using it to send legit emails to clients so not spammers. companies who are trusted to be using the system but guess they will just have to export and manually send via their own mail client?

cheers

andydeans 0 Junior Poster

thanks for the reply, so how do i get data into my database from this and how do i send the data to them. do they need to allow me to add code to their pages?

many thanks

andydeans 0 Junior Poster

thanks that is exactly what i was thinking.

however how could i set "John Smith" to a value from the database?

appreciate your help, also how would i start the script off, would it be in the page where i have the form or would it be called from a seperate page?

just not entirely sure how you call the script to be honest.

cheers

andydeans 0 Junior Poster

thanks however i dont have any control over the site. i just have their login details for each user but the other site needs me to send it ver and i am not sure how i would do this?

thanks again

andydeans 0 Junior Poster

hi i need some help with a project i am working on.

i basically have a back end site php/mysql with clients addresses etc, i need to be able to send that data to another site where they have login and passord for and it pre populate the forms in the other site as best as it can.

so what i was thinking was storing their login in the users table along with their username and password for the current site.

then when they choose a client to send data to the other site it somehow sends the data automatically logs them in and pre populates the name and address.

anyone help me at all, i think i know in theory but no idea what i need to do, script wise or have i missed anything needed?

many thanks

andydeans 0 Junior Poster

hey thanks for the reply, sorry for long time not reply.

looking at i am not sure how i would exactly impliment into the system?

can you help with a bit more detail?

i have a mysql database behind the php site, i want to add in placeholders when they are inserting the letter into the database and then when the produce that letter for a client it recognizes where the user had put the place holders to replace with a value from the database?

sorry but if you could guide me a bit further i would appreciate.

many thanks

andydeans 0 Junior Poster

thanks rodney,

so it is not possible to do this.

i constantly get asked this for to send mailshots from a different website as i have seen this on some car websites it shows from say me email address to yours but from their site.

andydeans 0 Junior Poster

hi,

are there any issues of using a php script that sends via a dedicated linux box to an address from an email address different from the domain on this box?

so for example domain is: mydomain.com on dedicated box, someone comes to the site and sends an email to a friend at say joebloggs@hotmail.com

however the enterered from address is not an address of mydomain.com, but instead say yahoo.com.

is this fine to do or will it cause problems with ip address blacklisting etc?

thanks for your help

andydeans 0 Junior Poster

got it working with bcc and body = test, however how can i set the body to come from a form element? say a text area?

<a href="mailto:&bcc=test@domain.com?body=test" />

any suggestions?

andydeans 0 Junior Poster

thanks for the help guys.

only thing i have an issue with is setting up sub domains simply through an interface?

any recommendations?

cheers

andydeans 0 Junior Poster

another thing that might be a quick one is, how can i create a mailto button on the site which will open the default email prgoram but automatically add the addresses to a bcc rather than the standar to option when you click a mailto on a site?

many thanks

andydeans 0 Junior Poster

hi guys,

need some urgent help from you.

i need 2 things to work out, looked around on net and found some scripts but wondered if someone could help point me to a good way of doing this.

i need to be able to mail merge to word/wordpad whatever the default editor is on the end users pc with php , mysql database.

i have a number of contacts in the database and we want to be able to allow the end user to produce word docs or rtf docs which automatically generates the document into their word and starts the mail merge. is this possible or can it be done one the site in anyway?

i know you can export to excel and then do it manually but the end user needs it to generate everything for them with ease.

hope someone can help.

many thanks

andydeans 0 Junior Poster

thanks i know these steps as i have hosted a mail server in my office before but never a website. thanks for the info though but really just needing to know is it fine to run a win 7 pc as a php/mysql website hotsted or should it be server technology?

also how would you manage sub domains?

many thanks

andydeans 0 Junior Poster

Hi,

thanks for the reply. yeah i normally have used windows for testing only bust would like to hear back from anyone who has ever hosted an actual site on their pc?

does it have to be win server or win 7 fine and just assign static ip address to this?

any other help appreciate but thanks for the info kieran re the pros and cons.

cheers

andydeans 0 Junior Poster

hi

i found this thread:

http://www.daniweb.com/forums/thread197057.html

will this script backup all databases in the mysql directory?

what do you need to backup and restore all mysql databases in xampp? do i just copy and paste the directory to another location everyday or is there a particular way?

i know you can take backups in php my admin but you would have to do one after another which could be lengthy.

thanks for any help

andydeans 0 Junior Poster

hi,

i have installed xammp on my win 7 pc, i have a static ip address and wondered if i could use this to host my website?

is there any disadvatanges of using a win 7 pc rather than linux server to host it?

should i use windows server to run php/mysql or is a standard windows pc suffice to do this?

if so can anyone tell mw how i would create sub domains using xammp or do i create them in my domain management with registrar?

any help/advice greatly appreciated.

many thanks

andydeans 0 Junior Poster

cheers

andydeans 0 Junior Poster

hi,

i have read around and all i seem to find is one and in the where clause along with an OR or either but i was wondering if it was fine to use 2 or maybe 3 AND in the where clause?

most of my where clauses in past as still learning i have only had 1 AND or an OR in the query.

probably simple question but just want to make sure i wont have any issues.

many thanks

andydeans 0 Junior Poster

hi,

need some major help with this. i have a site which has nots page etc and is great for recording data like this however i need to record calls and integrate into the site. no idea where to start with this one, has anyone got some suggestions on this?

many thanks

andydeans 0 Junior Poster

thanks for the info guys.

to be honest it is for 1 client site and i have used in the past. only questions really are how to do check virus scans etc.

with windows server i can remote desktop in check firewall, logs and scan for viruses but never done this with linux.

also re openssl i need to encrypt and noticed this is free, i know it is self signed certificates but it is for a company portal so that wont matter.

will it cover all sub domains with open ssl and has anyone configured in the past?

i have done self signed certificates for OWA with windows but this is totally new to me to be honest.

thanks again

andydeans 0 Junior Poster

thanks, i would be interested in this for definate.

my other query though is how could i insert time into the database?

can i have say 2 drop down boxes which form one value to submit into the database?

many thanks

andydeans 0 Junior Poster

hi,

this is prob really simple but what is the best way for me to add time to call on a form?

i have created a column in my tesk table called timetocall with type = TIME

what is best way to allow the user to key on the time? is it possible to have 2 drop downs but they submit the one value into the column in database?

also looking at another post how would i create a php script that would set a reminder? or could this be done in mysql query to check for say 15 mins to flag up before the call?

many thanks

andydeans 0 Junior Poster

thanks i tried both bbut no joy, however when i used the

GROUP BY users.UserID, users.FullName

that seems to work.

is there anything wrong with using this group by as opposed to your example?

just want to make sure it is ok.

many thanks again for your help

andydeans 0 Junior Poster

hi,

i have been trying to work out how to list all the users on the database for my website with a particular access level and also only the user id that the client is associated to however i end up with duplicated users.

here is my query so far

SELECT clients.ClientID, clients.ClientUserID, clients.AddedByUserID, users.UserID, users.FullName, users.AccessLevel
FROM users LEFT JOIN clients on users.UserID = clients.ClientUserID
WHERE users.AccessLevel = 1  or (clients.ClientUserID = users.UserID)and clients.ClientID = ParamClientID

clientUserID is the person who the client is assigned to.

access level 1 is admins where as the user whose client only has access level 2 so i only want the user whose client is to show in the drop down list.

can anyone shed any light on where i amgoing wrong?

thanks

andydeans 0 Junior Poster

i have googled this and saw that whitespace is the issue, however when it was on line one of the code before any html it did not work yet i move it below my connection file and other require once files and it executes no problem, weird??

thanks

andydeans 0 Junior Poster

php/mysql, i would normally use dreamweaver for designing so if it is simple enough to setup using this or any other methods i would appreciate, i saw a few java script but i would prefer if server side.

many thanks

andydeans 0 Junior Poster

hi,

i get this error on one of my pages, however if i move the session start code to check if user is logged in down a few lines below some query code for searching the site it works fine.

why would moving the session start down a bit on the page resolve this issue?

many thanks

andydeans 0 Junior Poster

hi,

never done this before and wondered if anyone could point me to a fairly simple step by step guide on how to add an rss feed from a site into our own web site?

many thanks

andydeans 0 Junior Poster

hi,

i have never used a dedicated linux server, however i am going to be switching one of our sites from shared hosting to a dedicated server due to traffic etc.

the host is giving cpanel which i just wanted to check with you guys if this is fine to contiune to use?

the main questions are aimed at opnenssl at they are:

i am interested in using openssl to encrypt data on the site.

how simple is this to setup? has anyone done this and happy to point me to some good documentation?

will it cover unlimited sub domains? i.e. https://subdomain.maindomain.com

really just looking for some good info on using openssl as a way of encrypting the site.

many thanks

andydeans 0 Junior Poster

mschroeder,

what can i say that was a great post reply.

thanks so much for taking the time. i appreciate it.

i will look more into open ssl.

so really to have a secure site without costing too much, open ssl, hashing passwords and we should be sorted then?

i will look at other sha version you mentioned about implimenting.

many thanks again